diff --git a/tracy/tools/soltracy.cc b/tracy/tools/soltracy.cc
index 2b534d73c7ba3fafef98eb095659b6ebcdc10254..6a0846af07cb826a52f723a1e806736474912ae1 100644
--- a/tracy/tools/soltracy.cc
+++ b/tracy/tools/soltracy.cc
@@ -76,11 +76,9 @@ int main(int argc, char *argv[]) {
   }
 
   // Chamber factory
-  if (ChamberFlag == false)
-    ChamberOff(); // turn off vacuum chamber setting, use the default one
-  else if (ChamberNoU20Flag == true)
-    DefineChNoU20(); // using vacuum chamber setting but without undulator U20
-  else if (ReadChamberFlag == true)
+ // if (ChamberFlag == false)
+  //  ChamberOff(); // turn off vacuum chamber setting, use the default +-1 meters
+  if (ReadChamberFlag == true)
     ReadCh(chamber_file); /* read vacuum chamber from a file "Apertures.dat" , soleil version*/
   PrintCh(); // print chamber into chamber.out
 
@@ -204,28 +202,36 @@ int main(int argc, char *argv[]) {
   if (CouplingFlag == true) {
     Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
     printlatt(); /* dump linear lattice functions into "linlat.dat" */
-    GetEmittance(ElemIndex("cav"), true);
+   // GetEmittance(ElemIndex("cav"), true);  //only for test
     Coupling_Edwards_Teng();
+    Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
     printglob(); /* print parameter list */
   }
 
   // add coupling by random rotating of the full quadrupole magnets
   if (ErrorCouplingFlag == true) {
+    prtmfile("flat_file.dat"); //print the elements without rotation errors
     SetErr(err_seed, err_rms);
+    prtmfile("flat_file_errcoupling_full.dat"); //print the elements with rotation errors
     Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
     printlatt(); /* dump linear lattice functions into "linlat.dat" */
     Coupling_Edwards_Teng();
-    GetEmittance(ElemIndex("cav"), true);
+   // GetEmittance(ElemIndex("cav"), true); //only for test
+    Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
+  //  printlatt();
     printglob(); /* print parameter list */
   }
   
   // add coupling by random rotating of the half quadrupole magnets, delicated for soleil
   if (ErrorCoupling2Flag == true) {
+    prtmfile("flat_file.dat"); //print the elements without rotation errors
     SetErr2(err_seed, err_rms);
+    prtmfile("flat_file_errcoupling_half.dat"); //print the elements with rotation errors
     Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
     printlatt(); /* dump linear lattice functions into "linlat.dat" */
     Coupling_Edwards_Teng();
-    GetEmittance(ElemIndex("cav"), true);
+   // GetEmittance(ElemIndex("cav"), true);
+   Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
     printglob(); /* print parameter list */
   }
 
@@ -237,7 +243,7 @@ int main(int argc, char *argv[]) {
         "\n Read Multipoles file for lattice with thick sextupoles \n");
     ReadFieldErr(multipole_file);
     //first print the full lattice with error as a flat file
-    prtmfile("flat_file_error.dat"); // writes flat file   /* very important file for debug*/
+    prtmfile("flat_file_errmultipole.dat"); // writes flat file with all element errors  /* very important file for debug*/
     Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
     printglob();
   }
@@ -248,14 +254,14 @@ int main(int argc, char *argv[]) {
       fprintf(stdout,
           "\n Setting Multipoles for lattice with thin sextupoles \n");
       Multipole_thinsext(fic_hcorr, fic_vcorr, fic_skew); /* for thin sextupoles */
-      prtmfile("flat_file_error.dat"); // writes flat file   /* very important file for debug*/
+      prtmfile("flat_file_errmultipole.dat"); // writes flat file   /* very important file for debug*/
       Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
       printglob();
     } else {
       fprintf(stdout,
           "\n Setting Multipoles for lattice with thick sextupoles \n");
       Multipole_thicksext(fic_hcorr, fic_vcorr, fic_skew); /* for thick sextupoles */
-      prtmfile("flat_file_error.dat"); // writes flat file   /* very important file for debug*/
+      prtmfile("flat_file_errmultipole.dat"); // writes flat file   /* very important file for debug*/
       Ring_GetTwiss(chroma = true, 0.0); /* Compute and get Twiss parameters */
       printglob();
     }
@@ -267,26 +273,26 @@ int main(int argc, char *argv[]) {
 
   // computes TuneShift with amplitudes
   if (AmplitudeTuneShiftFlag == true) {
-    if (ChamberFlag == true) {
+   // if (ChamberFlag == true) {
       TunesShiftWithAmplitude(_AmplitudeTuneShift_nxpoint, _AmplitudeTuneShift_nypoint,
           _AmplitudeTuneShift_nturn, _AmplitudeTuneShift_xmax,
           _AmplitudeTuneShift_ymax, _AmplitudeTuneShift_delta);
       //NuDx(31L,21L,516L,0.025,0.005,dP);
-    } else { // Utility ?
-      TunesShiftWithAmplitude(50L, 30L, 516L, 0.035, 0.02, dP);
-    }
+    } //else { // Utility ?
+     // TunesShiftWithAmplitude(50L, 30L, 516L, 0.035, 0.02, dP);
+   // }
 
-  }
+  //}
   if (EnergyTuneShiftFlag == true) {
-    if (ChamberFlag == true) {
+   // if (ChamberFlag == true) {
       TunesShiftWithEnergy(_EnergyTuneShift_npoint, _EnergyTuneShift_nturn,
           _EnergyTuneShift_deltamax);
       //NuDp(31L,1026L,0.06);
-    } else { // utility ?
-      TunesShiftWithEnergy(31L, 1026L, 0.06);
-    }
+    }// else { // utility ?
+     // TunesShiftWithEnergy(31L, 1026L, 0.06);
+    //}
 
-  }
+  //}
 
   // Computes FMA
   if (FmapFlag == true) {
@@ -389,6 +395,8 @@ int main(int argc, char *argv[]) {
     globval.Cavity_on = cavityflag;
     globval.radiation = radiationflag;
   }
+  
+ 
 
   //  ????????????? NSRL version, Check with Soleil version "MomentumAcceptance"
   // IBS & TOUSCHEK