fix UTF8 escaping of log messages, retain newlines and tabs