one should not mix tcl cleaning with bash fragments written to stdout, if the modify the same state variables.