Use is_file instead of file_exists.