Noted that you may not want to just overwrite in every run, since you want to keep records for more than a single run. What may be better is to keep a rotating log file which will automatically create a new file when it's getting too big.
If it's ergonomic for you, you can also have a separate log file that only keep the last run.