Handle Control-C gracefully