keep log messages, but behind debug flag
improve test script a bit
don't enable debug mode until printDetails is (presumably) done