Thanks so much for the good advice.
I just tried your code and it works well - however - it behaves the same as the original in that it just keeps adding another line every time it runs - instead of overwriting the previous line written. It appends another line right behind the previous one.
The other code added a new line just under the previous line.
Thanks again for responding.