Index: tmp/org.txm.core/src/java/org/txm/objects/Workspace.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Workspace.java	(revision 1545)
+++ tmp/org.txm.core/src/java/org/txm/objects/Workspace.java	(revision 1546)
@@ -214,14 +214,29 @@
 		File PROJECT = new File(binCorpusDir, ".project"); //$NON-NLS-1$
 		binCorpusDir = new File(this.getLocation(), binCorpusDir.getName()); // this is to ensure the project is in the workspace files
 		
+		
+		
 		if (binCorpusDir.exists() && HTMLs.exists() && DATAs.exists()
 				&& REGISTRY.exists() && PARAMS.exists() && PROJECT.exists())// && correspfile.exists())
 		{// minimal base data
+		
+			File[] maincorpusNames = DATAs.listFiles();
+			String maincorpusName = "";
+			if (maincorpusNames.length == 0) { // no CQP corpus
+				System.out.println(NLS.bind("Error: no CQP corpus data found in {0} directory.", DATAs));
+				return null;
+			} else {
+				maincorpusName = maincorpusNames[0].getName();
+			}
 			
 			Project p = getProject(binCorpusDir.getName());
 			if (p != null) {
-				p.delete();
+				p.delete(); // a project with the same name already exists
 			}
+			p = getProject(maincorpusName);
+			if (p != null) {
+				p.delete(); // a project with the same name already exists
+			}
 
 			//System.out.println(parameters.toString());
 			
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java	(revision 1545)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorpus.java	(revision 1546)
@@ -345,12 +345,25 @@
 		//
 		//		Toolbox.workspace.save();
 
+		// test with project name
 		Project p = Toolbox.workspace.getProject(corpusDirectory.getName().toUpperCase().toUpperCase());
 		if (p != null) {
-			System.out.println("Aborting loading of "+corpusDirectory+". A corpus with the same name already exists.");
+			System.out.println(NLS.bind("Aborting loading of {0}. A corpus with the same name already exists.", corpusDirectory));
 			return null;
 		}
 
+		// test with CQP MainCorpus name
+		File dataDirectory = new File(corpusDirectory, "data");
+		File[] mainCorpusDirs = dataDirectory.listFiles();
+		if (mainCorpusDirs != null && mainCorpusDirs.length > 0) {
+			String mainCorpusName = mainCorpusDirs[0].getName();
+			p = Toolbox.workspace.getProject(mainCorpusName);
+			if (p != null) {
+				System.out.println(NLS.bind("Aborting loading of {0}. A corpus with the same {1} CQP MainCorpus name already exists.", corpusDirectory, mainCorpusName));
+				return null;
+			}
+		}
+
 		// seems like a binary corpus directory
 		// copy files in the new current corpora directory
 		File destDir = new File(Toolbox.workspace.getLocation(), corpusDirectory.getName().toUpperCase());
@@ -364,6 +377,7 @@
 		File dotProjectFile = new File(destDir, ".project");
 		if (paramFile.exists() && paramFile.isDirectory() && dotProjectFile.exists() && dotProjectFile.isFile()) {
 			System.out.println(NLS.bind(TXMUIMessages.loadingTheP0BinaryCorpusAsATXM080Corpus, destDir));
+
 			project = Load080BinaryCorpus.loadBinaryCorpusAsDirectory(destDir);
 		} else if (importXMLFile.exists()) {
 			System.out.println(NLS.bind(TXMUIMessages.loadingTheP0BinaryCorpusAsATXM079Corpus, destDir));
@@ -372,6 +386,10 @@
 			System.out.println(NLS.bind("Error: {0} is not a binary corpus directory.", destDir));
 		}
 
+		if (!destDir.equals(corpusDirectory) && project == null) { // clean if necessary
+			DeleteDir.deleteDirectory(destDir); // the corpus directory was not in the corpora directory
+		}
+
 		return project;
 	}
 }
\ No newline at end of file
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/Load080BinaryCorpus.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/Load080BinaryCorpus.java	(revision 1545)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/Load080BinaryCorpus.java	(revision 1546)
@@ -34,6 +34,7 @@
 import org.txm.Toolbox;
 import org.txm.objects.Project;
 import org.txm.rcp.messages.TXMUIMessages;
+import org.txm.utils.DeleteDir;
 import org.txm.utils.logger.Log;
 import org.txm.utils.zip.Zip;
 
@@ -44,7 +45,7 @@
  */
 public class Load080BinaryCorpus {
 
-	
+
 	public static boolean canLoad(File zipFile) {
 		String basedirname = Zip.getRoot(zipFile);
 		return Zip.hasEntries(zipFile, basedirname+"/.settings/", basedirname+"/.project", basedirname+"/data/", basedirname+"/txm/", basedirname+"/HTML/", basedirname+"/registry/");
@@ -61,22 +62,22 @@
 		//ZIPPED FILE
 		if (monitor != null) monitor.beginTask(TXMUIMessages.loadingBinaryCorpus, 100);
 		if (monitor != null) monitor.subTask(TXMUIMessages.extractingBinaryCorpus);
-		
+
 		String basedirname = Zip.getRoot(zipFile);
-		
+
 		Project p = Toolbox.workspace.getProject(basedirname.toUpperCase());
 		if (p != null) {
 			System.out.println("Aborting loading of "+zipFile+". A corpus with the same name already exists.");
 			return null;
 		}
-		
+
 		if (!canLoad(zipFile)) {
 			Log.info(NLS.bind(TXMUIMessages.binaryCorpusIsNotATXM080CorpusNoSettingsNorProjectFile, zipFile.getName()));
 			return null;
 		}
-		
+
 		System.out.println(NLS.bind(TXMUIMessages.loadingTheP0BinaryCorpusAsATXM080Corpus, zipFile.getName()));
-		
+
 		try {
 			//System.out.println(NLS.bind(Messages.AddBase_29, zipFile, corporaDir));
 			Zip.decompress(zipFile, Toolbox.workspace.getLocation(), false, monitor);
@@ -88,15 +89,31 @@
 		if (monitor != null) monitor.worked(50);
 
 		if (monitor != null) monitor.subTask(TXMUIMessages.loadingTheCorpusInThePlatform);
-		Project newProject = loadBinaryCorpusAsDirectory(new File(Toolbox.workspace.getLocation(), basedirname));
+		File corpusDirectory = new File(Toolbox.workspace.getLocation(), basedirname);
+
+		// test with CQP MainCorpus name
+		File dataDirectory = new File(corpusDirectory, "data");
+		File[] mainCorpusDirs = dataDirectory.listFiles();
+		if (mainCorpusDirs != null && mainCorpusDirs.length > 0) {
+			String mainCorpusName = mainCorpusDirs[0].getName();
+			p = Toolbox.workspace.getProject(mainCorpusName);
+			if (p != null) {
+				System.out.println(NLS.bind("Aborting loading of {0}. A corpus with the same {1} CQP MainCorpus name already exists.", corpusDirectory, mainCorpusName));
+				DeleteDir.deleteDirectory(corpusDirectory); // clean files
+				return null;
+			}
+		}
+
+		Project newProject = loadBinaryCorpusAsDirectory(corpusDirectory);
 		if (newProject == null) {
+			DeleteDir.deleteDirectory(corpusDirectory); // clean files
 			System.out.println(TXMUIMessages.failedToLoadBinaryCorpusNullError);
 			return null;
 		}
-		
+
 		return newProject;
 	}
-	
+
 	/**
 	 * load the content of the file if its a directory containing at least the sub folders :
 	 * txm, html, data and registry.
@@ -114,13 +131,13 @@
 
 		File txmcorpora = new File(Toolbox.getTxmHomePath(), "corpora"); //$NON-NLS-1$
 		txmcorpora.mkdir();
-		Project base = Toolbox.workspace.scanDirectory(binCorpusDirectory);
-		if (base == null) {
+		Project project = Toolbox.workspace.scanDirectory(binCorpusDirectory);
+		if (project == null) {
 			Log.severe(NLS.bind(TXMUIMessages.failedToLoadCorpusFromDirectoryColonP0WeCannotFindTheNecessaryComponents, binCorpusDirectory)); 
 			return null;
 		}
 
 		Toolbox.workspace.saveParameters();
-		return base;
+		return project;
 	}
 }
\ No newline at end of file
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorporaDirectory.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorporaDirectory.java	(revision 1545)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/LoadBinaryCorporaDirectory.java	(revision 1546)
@@ -51,6 +51,7 @@
 import org.txm.searchengine.core.SearchEngine;
 import org.txm.searchengine.core.SearchEnginesManager;
 import org.txm.utils.io.IOUtils;
+import org.txm.utils.logger.Log;
 
 /**
  * Create projects from one binary corpus directory
@@ -195,7 +196,7 @@
 
 //				Project base = LoadBinaryCorpus.loadBinaryCorpusAsDirectory(corpusDirectory);
 				if (project == null) {
-					System.out.println("Fail to load binary corpus: "+corpusDirectory);
+					Log.warning("Error: fail to load binary corpus: "+corpusDirectory);
 				} else {
 					projects.add(project);
 				}
