Client shutdown issue: Improve logging  #2442