exit warning mainFrame