Adding of encoding for error messages.
Updates around logging.