Updated code for file1.txt