Improving MIME type detection