Change dir_ctrl to check for the environment variable before using the default