catch shutdown errors in the watcher thread for the gateway.