changes to write in the output file