added text mime type support
raise exception on unsupported mime type
updated tests