now catch KeyboardInterrupt to exit cleanly