Use is_file instead of file_exists as file_exists returns true when a valid directory is given
Clean data