refine debug output