Refine debug method