Added method to open window if application is invoked after the main window has been closed