Add explicit error computation (as this is no longer part of the optimize() step)