Added support for exiting from event loop when prompt did not receive response