improved debug info display function