Tiny change to printToString.
Some added stats for test script.