Tiny changes in setup/teardown: stdout restored, redundant Close() removed