fixed the precision of values being written to files