Append to log file instead of closing at exit