swap file_exists with is_file