It's a smart approach, and it could work if you had the 'save changes to the file' unchecked, and you would not actually need to add any lines back, BUT this will not work in multithreaded. Because this would be an infinite loop, it would keep taking and adding lines back to the file forever...