gave up and put write to file back to normal

only writes one temp value