Hi there,
If you really wish to have the data stores in different/ separate text files, make sure that you have different filename to the filepath.
You may, for instance, differ the filename by appending the system time to your filename.
i.e. DATA_191055.txt
Hope this gives you a clue to your problem.
PS: A similar example of file logging attached