Handle files with is_file instead of file_exists
#27440
Merged
is_file instead of file_exists
#27440