catch TERM signal, log that event and exit