Refine isFile()