debug logging tweaks