Fixed bug in log file to append output.