work on hasFile and file.