Index: Singular/LIB/tropical.lib
===================================================================
--- Singular/LIB/tropical.lib	(revision 1fb20e9245aa094bd5f9aceb554d08c4af44d72f)
+++ Singular/LIB/tropical.lib	(revision 081f5e9083d6d6daad82ed16b87ba288fc38b5ae)
@@ -1,4 +1,4 @@
 ////////////////////////////////////////////////////////////////////////////////
-version="version tropical.lib 4.2.1.1 Jul_2021 ";
+version="version tropical.lib 4.2.1.2 Nov_2021 ";
 category="Tropical Geometry";
 info="
@@ -589,8 +589,8 @@
         // from LIFTRING are present,
         // and where also the variables of CUTDOWNRING live
-	list RL=ring_list(LIFTRING);
-	list RL2=ring_list(CUTDOWNRING);
-	RL[2]=RL2[2];
-	RL[3]=list(list("dp",1:nvars(CUTDOWNRING)));
+        list RL=ring_list(LIFTRING);
+        list RL2=ring_list(CUTDOWNRING);
+        RL[2]=RL2[2];
+        RL[3]=list(list("dp",1:nvars(CUTDOWNRING)));
         ring REPLACEMENTRING = ring(RL);
         list repl=imap(CUTDOWNRING,repl); // get the replacement rules
@@ -4127,5 +4127,5 @@
         variablen=0;
         j2=0;
-	VARIABLEN=list();
+        VARIABLEN=list();
         for(j1=1;j1<=nvars(basering)-1;j1++)
         {
@@ -4141,11 +4141,11 @@
             variablen=variablen+var(j1); // read the set of remaining variables
                                          // (needed to make quotring later)
-	    VARIABLEN=VARIABLEN+list(RL[2][j1]);
+            VARIABLEN=VARIABLEN+list(RL[2][j1]);
           }
         }
         // return pideal, the initial and the list ergl which tells us
         // which variables we replaced by which form
-	RL=ring_list(BASERING);
-	RL[2]=VARIABLEN+list("t");
+        RL=ring_list(BASERING);
+        RL[2]=VARIABLEN+list("t");
         RL[3]=list(list("dp",1:size(VARIABLEN)),list("lp",1:1));
         ring BASERINGLESS1 = ring(RL);
@@ -4623,6 +4623,8 @@
         if (charstr(basering)!="0")
         {
-          system("sh","gfan_tropicalbasis --mod "+charstr(basering)+" < /tmp/gfaninput > /tmp/gfanbasis");
-          system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput");
+          if (system("sh","gfan_tropicalbasis --mod "+charstr(basering)+" < /tmp/gfaninput > /tmp/gfanbasis"))
+          { ERROR("error in gfan_tropicalbasis");
+          if (system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput"))
+          { ERROR("error in gfan_tropicalintersection");
         }
         else
@@ -4630,6 +4632,8 @@
 //          system("sh","gfan_tropicalstartingcone < /tmp/gfaninput > /tmp/gfantropstcone");
 //          system("sh","gfan_tropicaltraverse < /tmp/gfantropstcone > /tmp/gfanoutput");
-          system("sh","gfan_tropicalbasis < /tmp/gfaninput > /tmp/gfanbasis");
-          system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput");
+          if (system("sh","gfan_tropicalbasis < /tmp/gfaninput > /tmp/gfanbasis"))
+          { ERROR("error in gfan_tropicalbasis");
+          if (system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput"))
+          { ERROR("error in gfan_tropicalintersection");
         }
         string trop=read("/tmp/gfanoutput");
@@ -4666,5 +4670,6 @@
       else
       {
-        system("sh","gfan_tropicallifting -n "+string(anzahlvariablen)+" --noMult -c < /tmp/gfaninput > /tmp/gfanoutput");
+        if(system("sh","gfan_tropicallifting -n "+string(anzahlvariablen)+" --noMult -c < /tmp/gfaninput > /tmp/gfanoutput"))
+        { ERROR("error in gfan_tropicallifting"); }
         // read the result from gfan and store it to a string,
         // which in a later version
@@ -4756,5 +4761,5 @@
     if (anzahlvariablen+numberdeletedvariables<nvars(basering))
     {
-      list l2; 
+      list l2;
       for (int zz = 1; zz <= (nvars(basering)-anzahlvariablen-numberdeletedvariables); zz++)
       {
@@ -4954,5 +4959,5 @@
       variablen=variablen+var(j);
     }
-    list l3; 
+    list l3;
     for (int zz = string(nvars(BASERING)-anzahlvariablen+1); zz <= string(nvars(BASERING)-anzahlvariablen+neuvar); zz++)
     {
@@ -5693,6 +5698,8 @@
             if (charstr(basering)!="0")
             {
-              system("sh","gfan_tropicalbasis --mod "+charstr(basering)+" < /tmp/gfaninput > /tmp/gfanbasis");
-              system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput");
+              if(system("sh","gfan_tropicalbasis --mod "+charstr(basering)+" < /tmp/gfaninput > /tmp/gfanbasis"))
+              { ERROR("error in gfan_tropicalbasis"); }
+              if(system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput"))
+              { ERROR("error in gfan_tropicalintersection"); }
             }
             else
@@ -5700,6 +5707,8 @@
 //      system("sh","gfan_tropicalstartingcone < /tmp/gfaninput > /tmp/gfantropstcone");
 //      system("sh","gfan_tropicaltraverse < /tmp/gfantropstcone > /tmp/gfanoutput");
-              system("sh","gfan_tropicalbasis < /tmp/gfaninput > /tmp/gfanbasis");
-              system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput");
+              if(system("sh","gfan_tropicalbasis < /tmp/gfaninput > /tmp/gfanbasis"))
+              { ERROR("error in gfan_tropicalbasis"); }
+              if(system("sh","gfan_tropicalintersection < /tmp/gfanbasis > /tmp/gfanoutput"))
+              { ERROR("error in gfan_tropicalintersection"); }
             }
             string trop=read("/tmp/gfanoutput");
@@ -5736,5 +5745,6 @@
           else
           {
-            system("sh","gfan_tropicallifting -n "+string(anzahlvariablen)+" --noMult -c < /tmp/gfaninput > /tmp/gfanoutput");
+            if(system("sh","gfan_tropicallifting -n "+string(anzahlvariablen)+" --noMult -c < /tmp/gfaninput > /tmp/gfanoutput"))
+            { ERROR("error in gfan_tropicallifting"); }
             // read the result from gfan and store it to a string,
             // which in a later version
