Add env_dir set function.