diff --git a/launch.py b/launch.py
index 2a7641df03e10d0c2e66e737fe47f1d5961dbe62..9d75e0463b386c61b8797326f93292476103b47b 100755
--- a/launch.py
+++ b/launch.py
@@ -339,16 +339,17 @@ class LaunchJob(ParametricJob):
         # filling command to battery
         pin.write('import sys, os, os.path\n')
         if self.debug:
-            pin.write('print ("sys.path = ", sys.path\n)')
-            pin.write('print ("os.getcwd() = ", os.getcwd()\n)')
+            pin.write('print ("sys.path = ", sys.path)\n')
+            pin.write('print ("os.getcwd() = ", os.getcwd())\n')
         #pin.write("raw_input()\n")
         pin.write('if os.path.isdir(r"%s"):\n'%mtfdir)
         pin.write('\tsys.path.append(r"%s")\n'%mtfdir) # mtfdir est dorenavant un abspath
         #pin.write('\tsys.path.append(os.path.abspath(r"%s"))\n'%mtfdir)
         pin.write('else:\n')
-        pin.write('\tprint ("metafor dir %s not found!"\n)'%mtfdir)
+        pin.write('\tprint ("metafor dir %s not found!")\n'%mtfdir)
         pin.write('\tsys.exit()\n\n')
-        pin.write('execfile(r"%s")\n'%os.path.join(mtfdir,'.pythonrc.py'))
+        pin.write('exec(open(r"%s").read())\n'%os.path.join(mtfdir,'.pythonrc.py'))
+        #pin.write('execfile(r"%s")\n'%os.path.join(mtfdir,'.pythonrc.py'))
         pin.write('import toolbox.battery as b\n')
         pin.write('battery = b.Battery() \n')
         pin.write('battery.keepFacs = True\n')