gracefully stop on TERM signal