Fixed printing errors in the log-file