Replace file_exists with is_file