Added ensure_safe_encoding to text from logs