revised conditionals for app_code_dir