Added a condition for the creation of new.txt