Add debug logging to show MonitorImpl's thread shutdown gracefully