tee program to write output of txt file