Catch KeyboardInterrupt.