Catching SIGINT and SIGTERM