update get_prefix() to search in envs_dirs