Correctly checks for the file name.