Add support for file type
Add spec tests