fixed a log file isse

the last echo to the log file was overwriting the whole log