major enhancements to output.tcl: added logfile function and compound print