Exit cleanly when SIGTERM is intercepted