try output to a textfile (not working)