fix error in isFile()