Exit gracefully on SIGTERM