Commented out checking for mimetype file. Add error reporting.