Further improvements to debug printing.