diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SystemFunction.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SystemFunction.java
index 25282e2bf363235803ef47cc85d81dd5fd906559..3d0e899309bf91785083ad099e611f1459ea0ee9 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SystemFunction.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SystemFunction.java
@@ -45,7 +45,7 @@ public abstract class SystemFunction extends RBuiltinNode {
         if (shell == null) {
             shell = "/bin/sh";
         }
-        if (System.getProperty("fastr.logchild") != null) {
+        if (RContext.getInstance().stateREnvVars.getMap().get("FASTR_LOGCHILD") != null) {
             System.out.printf("FastR system: %s -c %s%n", shell, command.getDataAt(0));
         }
         ProcessBuilder pb = new ProcessBuilder(shell, "-c", command.getDataAt(0));