getMimeType(file) in fileoperations, with fixes