exit more gracefully in response to Ctrl-C