add error information to filetype controller.
add specs for the filetypes controller.