i use bpy.ops.wm.mainfile(...) in class and after this i try use method from another class method:
def invoke(self, context, event): return context.window_man