Use getMimeType() instead of mime type guesser.