Fix some issues with the log dump, including some encoding issues.