Fixed encoding in debug log mode.