More improvements to debug logging for upgrade test.