Catch SIGINT and shut down gracefully