I\'m trying to write a program that reads a txt file and outputs a string to one line of the txt file one after the other. Unfortunately, I always get the same error message