Added MIME type check