Rewrite files opens a file for reading and writing, but will remove all the contents of a file. To open a file for appending, use AppendFile.
Events called: