move mimetypes to libmagic