the original saveuseroutput.cc