change file_exists to is_file

file_exists check the param against file & dir. is_file check if it is
a file only. Furthermore the performance is much better.