Write encoding error to error log