mime_file minor refactoring.