Added mimetype recognition