Edited to use `file' to id filetype
Use `file' to id filetype