Fix to improve logging; no functionality change so going straight to master.