You can't overwrite the txt file in the project.
In html5 export you can prompt players to save a new file using "Browser Invoke Download" action. They will see standard "Save As" dialogue.
In NWJS export you can use "Write File" action, this way you can save the file silently, without prompting the player.
.
Also, you need to replace "Wait 1s" with "Wait for previous action to complete" in your project.