Fixed an issue with log where a newline was not being inserted at the
end of a write