better newline handling in the Log module

- there are now a few extra line breaks in the output that could be
  stripped eventually (presumably at the call sites)