use classify function for mimetype detection
fix function if python knows the mimetype