When done, write the list back to text file, overwriting the original file.
Is that viable?
p.s. There is a high probability that I've read about doing it this way, somewhere in the past. Most likely, that would be this forum. In other words, it might be a good idea to try some searches here... you might find it described in more detail.
I read and saw some scripts using it but I didn't know if it's a good way but I will test it.
About searching... well I searched by "text file database" an didn't found that post.