clean exit on ESC from main loop