cleanup checkMimeType()