Handle SIGINT, SIGHUP, SIGTERM