fixed a variable name
diff --git a/src/packages/xdc/runtime/Error.xs b/src/packages/xdc/runtime/Error.xs
index b22191d..09094a2 100644
--- a/src/packages/xdc/runtime/Error.xs
+++ b/src/packages/xdc/runtime/Error.xs
@@ -22,7 +22,7 @@
     xdc.useModule('xdc.runtime.Text');
     var rtsVers = Packages.xdc.services.global.Vers.getXdcString
     (xdc.getPackageBase(Program.build.target.rts) + "/package/package.defs.h");
-    if (rtsVers < "xdc-H00" || origVers >= "xdc-a00") {
+    if (rtsVers < "xdc-H00" || rtsVers >= "xdc-a00") {
         xdc.useModule("xdc.runtime.Log");
         xdc.useModule("xdc.runtime.Diags");
     }