Added confirmation before closing gui