updated get mime type logic