Changing "file_exists" funciton for "is_file".