throwing useful exception if mime type is not known