try to catch case where writing to stale connection
some more logging