collect errors to ret.errors, deprecate ret.exitcode