Cleaned code in get_app_path