modify codes related to getting app_path.