Index: tmp/org.txm.utils/src/org/txm/utils/StreamHog.java
===================================================================
--- tmp/org.txm.utils/src/org/txm/utils/StreamHog.java	(revision 1648)
+++ tmp/org.txm.utils/src/org/txm/utils/StreamHog.java	(revision 1649)
@@ -34,7 +34,6 @@
 
 import org.txm.utils.logger.Log;
 
-// TODO: Auto-generated Javadoc
 /**
  * The Class StreamHog.
  * 
@@ -102,7 +101,6 @@
 				printMessage(line);
 				Log.fine(this.getName()+">" + line); //$NON-NLS-1$
 				lastline = line;
-
 			}
 		} catch (Throwable e) {
 			Log.fine("ERROR: broken process logging : "+e);
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPSearchEngine.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPSearchEngine.java	(revision 1648)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPSearchEngine.java	(revision 1649)
@@ -29,15 +29,15 @@
 import org.txm.utils.logger.Log;
 
 public class CQPSearchEngine extends SearchEngine {
-	
+
 	public static final String NAME = "CQP";
-	
+
 	/**
 	 * initialization state
 	 */
 	boolean state = false;
 	boolean useNetCQi = false;
-	
+
 	/**
 	 * list of CQP loaded/computed corpus
 	 */
@@ -56,14 +56,14 @@
 	@Override
 	public boolean start(IProgressMonitor monitor) throws Exception {
 
+		boolean cqiserverok = false;
+
 		if (monitor != null) {
 			monitor.subTask("Starting Corpus Engine...");
 		}
-		
+
 		CorpusManager.cleanCorpora();// to be sure to call cqpserver
 
-		boolean cqiserverok = false;
-
 		useNetCQi = CQPLibPreferences.getInstance().getBoolean(CQPLibPreferences.CQI_NETWORK_MODE);
 
 		Log.fine("Killing CQP processes if any...");
@@ -84,10 +84,10 @@
 			if (!binDir.isDirectory()) continue;
 			if (binDir.getName().startsWith(".")) continue;
 			if (binDir.getName().startsWith("~")) continue;
-			
+
 			File registryDir = new File(binDir, "registry");
 			if (!registryDir.isDirectory()) continue;
-			
+
 			File[] files = registryDir.listFiles(IOUtils.HIDDENFILE_FILTER);
 			if (files != null && files.length > 0) {
 				reg_path += path_separator + registryDir.getAbsolutePath();
@@ -116,6 +116,8 @@
 			init_path = null;
 		}
 
+
+
 		if (!remote) {
 
 			if (!useNetCQi) {
@@ -136,9 +138,9 @@
 				if (exec_path == null || exec_path.length() == 0 || new File(exec_path).exists()) {
 					Log.severe(TXMCoreMessages.bind("Error: the '{0}' preference is not set.", CQPLibPreferences.CQI_SERVER_PATH_TO_EXECUTABLE));
 				}
-//				if (new File(exec_path).exists()) {
-//					System.out.println("Error: the '"+CQPLibPreferences.CQI_SERVER_PATH_TO_EXECUTABLE+"' preference is not set.");
-//				}
+				//				if (new File(exec_path).exists()) {
+				//					System.out.println("Error: the '"+CQPLibPreferences.CQI_SERVER_PATH_TO_EXECUTABLE+"' preference is not set.");
+				//				}
 
 				cqiServer = new NetCqiServer(exec_path,
 						reg_path, 
@@ -231,46 +233,46 @@
 			return false;
 		}
 
-////		 initialize pre-configured subcorpus and partition of corpus registered in the default.xml workspace file
-//		System.out.print(TXMCoreMessages.Toolbox_workspace_init);
-//		for (Project b : Toolbox.workspace.getProjects()) {
-//			
-//			Log.info("Loading CQP corpora of " + b.getName() + " corpus...");
-//			
-//			if (!loadCQPCorpora(b, monitor)) {
-//				Log.severe("Failed to load CQP corpora of " + b.getName() + " corpus.");
-//			}
-//		}
-		
+		////		 initialize pre-configured subcorpus and partition of corpus registered in the default.xml workspace file
+		//		System.out.print(TXMCoreMessages.Toolbox_workspace_init);
+		//		for (Project b : Toolbox.workspace.getProjects()) {
+		//			
+		//			Log.info("Loading CQP corpora of " + b.getName() + " corpus...");
+		//			
+		//			if (!loadCQPCorpora(b, monitor)) {
+		//				Log.severe("Failed to load CQP corpora of " + b.getName() + " corpus.");
+		//			}
+		//		}
+
 		Log.fine(TXMCoreMessages.common_done);
 
 		return state;
 	}
 
-//	public boolean loadCQPCorpora(Project base, IProgressMonitor monitor) {
-//		//System.out.println("Load corpus from params: "+params.corpora);
-//		for (String corpusname : base.getProjectParameters().corpora.keySet()) {
-//			Element c = base.getProjectParameters().corpora.get(corpusname);
-//			try {
-//				MainCorpus corp = CorpusManager.getCorpusManager().getCorpus(corpusname);
-//				if (monitor != null) {
-//					monitor.subTask("Loading " + corp + " subcorpora and partitions of corpus " + corpusname + "...");
-//				}
-//				corp.setSelfElement(c);
-//				corp.setParent(base);
-//				corp.load(); // don't load corpus right now, wait for the search engine to be ready
-//				base.addChild(corp);
-//				if (!corp.getMetadatas().containsKey("lang")) { //$NON-NLS-1$
-//					corp.setAttribute("lang", c.getAttribute("lang")); //$NON-NLS-1$ //$NON-NLS-2$
-//				}
-//			} catch (Exception e) {
-//				System.out.println(e.getLocalizedMessage());
-//				org.txm.utils.logger.Log.printStackTrace(e);
-//				return false;
-//			}
-//		}
-//		return true;
-//	}
+	//	public boolean loadCQPCorpora(Project base, IProgressMonitor monitor) {
+	//		//System.out.println("Load corpus from params: "+params.corpora);
+	//		for (String corpusname : base.getProjectParameters().corpora.keySet()) {
+	//			Element c = base.getProjectParameters().corpora.get(corpusname);
+	//			try {
+	//				MainCorpus corp = CorpusManager.getCorpusManager().getCorpus(corpusname);
+	//				if (monitor != null) {
+	//					monitor.subTask("Loading " + corp + " subcorpora and partitions of corpus " + corpusname + "...");
+	//				}
+	//				corp.setSelfElement(c);
+	//				corp.setParent(base);
+	//				corp.load(); // don't load corpus right now, wait for the search engine to be ready
+	//				base.addChild(corp);
+	//				if (!corp.getMetadatas().containsKey("lang")) { //$NON-NLS-1$
+	//					corp.setAttribute("lang", c.getAttribute("lang")); //$NON-NLS-1$ //$NON-NLS-2$
+	//				}
+	//			} catch (Exception e) {
+	//				System.out.println(e.getLocalizedMessage());
+	//				org.txm.utils.logger.Log.printStackTrace(e);
+	//				return false;
+	//			}
+	//		}
+	//		return true;
+	//	}
 
 	@Override
 	public boolean initialize() {
@@ -326,24 +328,29 @@
 	@Override
 	public boolean stop() {
 		try {
-			if (cqiClient instanceof MemCqiClient) {
-				for (String name : ((MemCqiClient)cqiClient).listCorpora()) {
-					((MemCqiClient)cqiClient).dropCorpus(name);
+			if (cqiClient != null) {
+
+				if (cqiClient instanceof MemCqiClient) {
+					for (String name : ((MemCqiClient)cqiClient).listCorpora()) {
+						((MemCqiClient)cqiClient).dropCorpus(name);
+					}
 				}
+				cqiClient.disconnect();
 			}
-			
-			cqiClient.disconnect();
-			cqiServer.stop();
 
-			CorpusManager.clean();
-			if (cqiServer instanceof NetCqiServer) {
-				killSearchEngine();
+			if (cqiServer != null) {
+				cqiServer.stop();
+
+				CorpusManager.clean();
+				if (cqiServer instanceof NetCqiServer) {
+					killSearchEngine();
+				}
+
+				cqiClient = null;
+				cqiServer = null;
 			}
+			System.gc();
 
-			cqiClient = null;
-			cqiServer = null;
-			System.gc();
-			
 			state = false;
 		} catch (Exception e) {
 			Log.severe("Error while closing CQP: "+e.getLocalizedMessage());
@@ -360,8 +367,7 @@
 			// Windows OS
 			if (OSDetector.isFamilyWindows()) {
 				try {
-					Process p = Runtime.getRuntime().exec(
-							"taskkill /IM cqpserver.exe /F"); //$NON-NLS-1$
+					Process p = Runtime.getRuntime().exec("taskkill /IM cqpserver.exe /F"); //$NON-NLS-1$
 					p.waitFor();
 					p = Runtime.getRuntime().exec("taskkill /IM cqpserver.exe /F"); //$NON-NLS-1$
 					p.waitFor();
@@ -369,8 +375,7 @@
 					Log.severe(TXMCoreMessages.bind(TXMCoreMessages.failedToExecTaskkillIMCqpserverexeFColon, Log.toString(e)));
 					System.out.println(TXMCoreMessages.bind(TXMCoreMessages.failedToExecTaskkillIMCqpserverexeFColon, Log.toString(e)));
 					try {
-						Process p = Runtime.getRuntime().exec(
-								"tskill cqpserver.exe"); //$NON-NLS-1$
+						Process p = Runtime.getRuntime().exec("tskill cqpserver.exe"); //$NON-NLS-1$
 						p.waitFor();
 						p = Runtime.getRuntime().exec("tskill cqpserver.exe"); //$NON-NLS-1$
 						p.waitFor();
@@ -388,7 +393,6 @@
 					e.printStackTrace();
 					System.out.println(Log.toString(e));
 				}
-				;
 			}
 		// Mac, Linux
 			else {
@@ -466,10 +470,10 @@
 	@Override
 	public boolean hasIndexes(CorpusBuild corpus) {
 		if (corpus instanceof CQPCorpus) return true;
-		
+
 		try {
 			String id = corpus.getID();
-			
+
 			return CorpusManager.getCorpusManager().getCorpus(id) != null;
 		} catch (Exception e) {
 			e.printStackTrace();
Index: tmp/org.txm.setups/shared/win/txm.nsi
===================================================================
--- tmp/org.txm.setups/shared/win/txm.nsi	(revision 1648)
+++ tmp/org.txm.setups/shared/win/txm.nsi	(revision 1649)
@@ -267,14 +267,10 @@
 	
 	CreateDirectory "$SMPROGRAMS\TXM${Version}"
 	
-	;CreateShortCut "$SMPROGRAMS\TXM${Version}\TXM.lnk" "$INSTDIR\TXM.bat" "$INSTDIR\TXM.ico"
 	CreateShortCut "$SMPROGRAMS\TXM${Version}\TXM.lnk" "$INSTDIR\TXM.bat" "" "$INSTDIR\TXM.ico" 0
-	CreateShortCut "$SMPROGRAMS\TXM${Version}\TXM.lnk" "$INSTDIR\TXM debug.bat" "" "$INSTDIR\TXM.ico" 0
-	
+	CreateShortCut "$SMPROGRAMS\TXM${Version}\TXM debug.lnk" "$INSTDIR\TXM debug.bat" "" "$INSTDIR\TXM.ico" 0
 	CreateShortCut "$SMPROGRAMS\TXM${Version}\uninstall.lnk" "$INSTDIR\uninstall.exe"
-	
 	#CreateShortCut "$SMPROGRAMS\TXM${Version}\Manuel utilisateur FR.pdf.lnk" "$INSTDIR\doc\Manuel de TXM 0.7 FR.pdf"
-	
 	#CreateShortCut "$SMPROGRAMS\TXM${Version}\User Manual EN.pdf.lnk" "$INSTDIR\doc\TXM 0.7 Manual EN.pdf"
 	
 
@@ -511,9 +507,6 @@
 	
 	RMDir /r $INSTDIR
 	
-	# second, remove the link from the start menu
-	;Delete "$SMPROGRAMS\TXM${Version}\uninstall.lnk"
-	
 	RMDir /r "$SMPROGRAMS\TXM${Version}"
 	
 SectionEnd
Index: tmp/org.txm.translate.rcp/.~lock.messages_fr-slh.odt#
===================================================================
--- tmp/org.txm.translate.rcp/.~lock.messages_fr-slh.odt#	(revision 0)
+++ tmp/org.txm.translate.rcp/.~lock.messages_fr-slh.odt#	(revision 1649)
@@ -0,0 +1 @@
+Matthieu Decorde,mdecorde,matthieuPC,08.01.2019 16:34,file:///home/mdecorde/.config/libreoffice/4;
\ No newline at end of file
Index: tmp/org.txm.core/src/java/org/txm/core/engines/EnginesManager.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/engines/EnginesManager.java	(revision 1648)
+++ tmp/org.txm.core/src/java/org/txm/core/engines/EnginesManager.java	(revision 1649)
@@ -5,6 +5,7 @@
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.RegistryFactory;
+import org.txm.utils.LogMonitor;
 import org.txm.utils.logger.Log;
 
 /**
@@ -146,8 +147,25 @@
 	 * @return
 	 */
 	public boolean restartEngines() {
+		
 		Log.finest("Restarting " + this.size() + " " + this.getEnginesDescription() + " engine(s)."); //$NON-NLS-1$
-		return stopEngines() && startEngines(null);
+		
+		for (Engine engine : this.values()) {
+			try {
+				if (engine.isRunning()) {
+					Log.fine("Stopping " + this.getEnginesDescription() + " engine: " + engine.getName() + "..."); //$NON-NLS-1$
+					engine.stop();
+				}
+				if (!engine.isRunning()) {
+					Log.fine("Starting " + this.getEnginesDescription() + " engine: " + engine.getName() + "..."); //$NON-NLS-1$
+					engine.start(new LogMonitor());
+				}
+			} catch (Exception e) {
+				Log.severe("Error: failed to stop engine " + engine.getName() + ".");
+				e.printStackTrace();
+			}
+		}
+		return true;
 	}
 
 	/**
Index: tmp/org.txm.rcp.feature/win/TXM debug.bat
===================================================================
--- tmp/org.txm.rcp.feature/win/TXM debug.bat	(revision 1648)
+++ tmp/org.txm.rcp.feature/win/TXM debug.bat	(revision 1649)
@@ -1 +1 @@
-%~dp0/TXM.bat -consolelog -clean -debug -console -noexit
\ No newline at end of file
+"%~dp0/TXM.bat" -log -consolelog -clean -debug -console -noexit
\ No newline at end of file
Index: tmp/org.txm.rcp.feature/win/TXM.bat
===================================================================
--- tmp/org.txm.rcp.feature/win/TXM.bat	(revision 1648)
+++ tmp/org.txm.rcp.feature/win/TXM.bat	(revision 1649)
@@ -32,16 +32,13 @@
 
 mkdir "%DOTTXM%" 
 
-(
 echo "TXM: getting install date from %installdir%STAMP and %DOTTXM%STAMP files" 
 Fc "%installdir%STAMP" "%DOTTXM%STAMP" 
-) >"%TXMHOME%TXMOutputLogs.txt" 2>"%TXMHOME%TXMErrorLogs.txt" 
 
 IF errorlevel 1 (goto :install) else (goto :run)
 
 :install
 
-(
 echo "New TXM install: it's the first launch after the installation." 
 del "%temp%\org.txm.rcpapplication.prefs" 
 copy "%DOTTXM%configuration\.settings\org.txm.rcpapplication.prefs" "%temp%\org.txm.rcpapplication.prefs" 
@@ -70,13 +67,9 @@
 copy "%installdir%STAMP" "%DOTTXM%STAMP" 
 IF errorlevel 1 (echo "TXM: failed to copy %DOTTXM%STAMP file")
 
-) >"%TXMHOME%TXMOutputLogs.txt" 2>"%TXMHOME%TXMErrorLogs.txt" 
-
 :run
 
-(
 set _JAVA_OPTIONS=-Duser.home="%USERHOME%"
 echo running "%installdir%TXM.exe" -run --launcher.ini "%DOTTXM%TXM.ini" -data "%DOTTXM%data" -user "%DOTTXM%user" -install "%installdir%"echo running "%installdir%TXM.exe" -log -run --launcher.ini "%DOTTXM%TXM.ini" -consolelog -clean -debug -console -noexit -data "%TXMHOME%corpora" -user "%DOTTXM%user" -install "%installdir%\"
 REM "%installdir%TXM.exe" -run --launcher.ini "%DOTTXM%TXM.ini" -data "%DOTTXM%corpora" -user "%DOTTXM%user" -install "%installdir%"
-"%installdir%TXM.exe" -log -run --launcher.ini "%DOTTXM%TXM.ini" %ARGS% -data "%TXMHOME%corpora" -user "%DOTTXM%user" -install "%installdir%\"
-) >"%TXMHOME%TXMOutputLogs.txt" 2>"%TXMHOME%TXMErrorLogs.txt" 
+"%installdir%TXM.exe" -run --launcher.ini "%DOTTXM%TXM.ini" %ARGS% -data "%TXMHOME%corpora" -user "%DOTTXM%user" -install "%installdir%\"
