File writer update in code for output.txt