Graceful shutdown on SIGTERM