Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/view/ElementPropertiesView.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/view/ElementPropertiesView.java	(revision 3436)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/view/ElementPropertiesView.java	(revision 3437)
@@ -83,6 +83,8 @@
 	};
 	
 	private org.txm.searchengine.cqp.corpus.CQPCorpus corpus;
+
+	private ToolItem applyButton;
 	
 	//	private KeyListener allControlsKeyListener;
 	
@@ -182,6 +184,22 @@
 			public void widgetDefaultSelected(SelectionEvent e) { }
 		});
 		
+		applyButton = new ToolItem(buttons, SWT.ARROW | SWT.END);
+		applyButton.setText("OK");
+		applyButton.setToolTipText("Apply all new values in the fields");
+		applyButton.addSelectionListener(new SelectionListener() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				for (PropertyField c : textWidgets.values()) {
+					if (c.isDisposed()) continue;
+					saveFieldValue(c);
+				}
+			}
+			
+			@Override
+			public void widgetDefaultSelected(SelectionEvent e) { }
+		});
+		
 		fields = new Composite(parent, SWT.NONE);
 		GridData fields_gdata = new GridData(GridData.FILL, GridData.FILL, true, true);
 		fields.setLayoutData(fields_gdata);
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/view/PropertyField.java
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/view/PropertyField.java	(revision 3436)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/annotation/urs/view/PropertyField.java	(revision 3437)
@@ -61,7 +61,6 @@
 				if (e.widget.isDisposed()) return;
 				if (first) {
 					first = false;
-					return;
 				}
 				if (!t.getText().equals(view.getAnalecVue().getValeurChamp(view.element, t.getToolTipText()))) {
 					t.setBackground(new Color(t.getDisplay(),254, 216, 177));
Index: TXM/trunk/org.txm.analec.rcp/src/org/txm/macro/urs/prototypes/exploit/AllMesuresMacro.groovy
===================================================================
--- TXM/trunk/org.txm.analec.rcp/src/org/txm/macro/urs/prototypes/exploit/AllMesuresMacro.groovy	(revision 3436)
+++ TXM/trunk/org.txm.analec.rcp/src/org/txm/macro/urs/prototypes/exploit/AllMesuresMacro.groovy	(revision 3437)
@@ -12,13 +12,15 @@
 import org.txm.*
 import org.txm.rcp.swt.widget.parameters.*
 import org.txm.annotation.urs.*
+import org.txm.core.preferences.TBXPreferences
+import org.txm.core.preferences.TXMPreferences
 import org.txm.searchengine.cqp.corpus.*
 import org.apache.commons.lang.StringUtils;
 
 // BEGINNING OF PARAMETERS
 
-@Field @Option(name="tsvFile",usage="", widget="FileSave", required=true, def="result.tsv")
-File tsvFile
+@Field @Option(name="csvFile",usage="", widget="FileSave", required=true, def="result.tsv")
+File csvFile
 
 @Field @Option(name="default_schema_ursql", usage="TYPE@PROP=REGEX", widget="String", required=true, def="CHAINE")
 String default_schema_ursql
@@ -114,12 +116,13 @@
 }
 
 // WRITE RESULTS IN THE TSV FILE
-tsvFile.withWriter("UTF-8") { writer ->
+def separator = TBXPreferences.getInstance().getString(TBXPreferences.EXPORT_COL_SEPARATOR)
+csvFile.withWriter("UTF-8") { writer ->
 	writer.println "\t"+mesures.join("\t")
 	table.each { line -> writer.println line.join("\t")	}
 }
 
-println "Done. Results are saved in ${tsvFile.getAbsolutePath()} file."
+println "Done. Results are saved in ${csvFile.getAbsolutePath()} file."
 
 // UTILITY FUNCTIONS
 def execMesure(def mesure, def line, def corpus, def params) {
Index: TXM/trunk/org.txm.libs.office/src/org/txm/libs/office/WriteODS.java
===================================================================
--- TXM/trunk/org.txm.libs.office/src/org/txm/libs/office/WriteODS.java	(revision 3436)
+++ TXM/trunk/org.txm.libs.office/src/org/txm/libs/office/WriteODS.java	(revision 3437)
@@ -2,10 +2,7 @@
 
 import java.io.File;
 import java.util.ArrayList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
-import org.odftoolkit.odfdom.pkg.OdfXMLFactory;
 import org.odftoolkit.simple.SpreadsheetDocument;
 import org.odftoolkit.simple.table.Cell;
 import org.odftoolkit.simple.table.Row;
@@ -16,7 +13,7 @@
 	static { // set Log level to WARNING
 		try {
 			SpreadsheetDocument.newSpreadsheetDocument().close();
-			Logger.getLogger(OdfXMLFactory.class.getName()).setLevel(Level.WARNING);
+			ReadODS.static_set_log_level();
 		}
 		catch (Exception e) {
 			// TODO Auto-generated catch block
Index: TXM/trunk/org.txm.libs.office/src/org/txm/libs/office/ReadODS.java
===================================================================
--- TXM/trunk/org.txm.libs.office/src/org/txm/libs/office/ReadODS.java	(revision 3436)
+++ TXM/trunk/org.txm.libs.office/src/org/txm/libs/office/ReadODS.java	(revision 3437)
@@ -1,6 +1,7 @@
 package org.txm.libs.office;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -20,7 +21,7 @@
 	static {  // set Log level to WARNING
 		try {
 			SpreadsheetDocument.newSpreadsheetDocument().close();
-			Logger.getLogger(OdfXMLFactory.class.getName()).setLevel(Level.WARNING);
+			static_set_log_level();
 		}
 		catch (Exception e) {
 			// TODO Auto-generated catch block
@@ -42,7 +43,7 @@
 	
 	public ReadODS(File tableFile, String sheetname) throws Exception {
 		
-		Logger.getLogger(OdfXMLFactory.class.getName()).setLevel(Level.WARNING);
+		static_set_log_level();
 		spreadsheet = SpreadsheetDocument.loadDocument(tableFile);
 		
 		// the first access to the document causes a very long process
@@ -64,6 +65,23 @@
 		// table.getRowByIndex(0);
 	}
 	
+	public static void static_set_log_level() {
+		
+		Logger.getLogger(OdfXMLFactory.class.getName()).setLevel(Level.WARNING);
+		try {
+			java.util.logging.LogManager.getLogManager().readConfiguration(
+			        new java.io.ByteArrayInputStream("org.odftoolkit.level=WARNING".getBytes(java.nio.charset.StandardCharsets.UTF_8)));
+		}
+		catch (SecurityException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		catch (IOException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
 	public void close() {
 		spreadsheet.close();
 	}
@@ -140,7 +158,7 @@
 	
 	public static ArrayList<HashMap<String, String>> toHashMap(File inputFile, String sheetname) throws Exception {
 		
-		Logger.getLogger(OdfXMLFactory.class.getName()).setLevel(Level.WARNING);
+		static_set_log_level();
 		
 		SpreadsheetDocument spreadsheet = SpreadsheetDocument.loadDocument(inputFile);
 		
@@ -197,7 +215,7 @@
 	 */
 	public static ArrayList<ArrayList<String>> toTable(File inputFile, String sheetname) throws Exception {
 		
-		Logger.getLogger(OdfXMLFactory.class.getName()).setLevel(Level.WARNING);
+		static_set_log_level();
 		
 		SpreadsheetDocument spreadsheet = SpreadsheetDocument.loadDocument(inputFile);
 		
Index: TXM/trunk/org.txm.core/src/java/org/txm/objects/CorpusBuild.java
===================================================================
--- TXM/trunk/org.txm.core/src/java/org/txm/objects/CorpusBuild.java	(revision 3436)
+++ TXM/trunk/org.txm.core/src/java/org/txm/objects/CorpusBuild.java	(revision 3437)
@@ -973,4 +973,16 @@
 	public abstract CorpusBuild getRootCorpusBuild();
 	
 	public abstract List<? extends Match> getMatches();
+
+	/**
+	 * 
+	 * @return a list of errors if any, empty means the corpus is build is OK
+	 */
+	public abstract List<?> isBuildValid();
+	
+	/**
+	 * 
+	 * @return true an error message if the corpus is not ready
+	 */
+	public abstract String isReady();
 }
Index: TXM/trunk/org.txm.core/src/java/org/txm/Toolbox.java
===================================================================
--- TXM/trunk/org.txm.core/src/java/org/txm/Toolbox.java	(revision 3436)
+++ TXM/trunk/org.txm.core/src/java/org/txm/Toolbox.java	(revision 3437)
@@ -40,6 +40,7 @@
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Locale;
 import java.util.Set;
 import java.util.logging.Level;
@@ -67,6 +68,7 @@
 import org.txm.core.preferences.TBXPreferences;
 import org.txm.core.preferences.TXMPreferences;
 import org.txm.core.results.TXMResult;
+import org.txm.objects.CorpusBuild;
 import org.txm.objects.Workspace;
 import org.txm.utils.BundleUtils;
 import org.txm.utils.DeleteDir;
@@ -826,14 +828,14 @@
 			}
 		}
 	}
-
+	
 	/**
 	 * @return the Eclipse RCP configuration directory (osgi.configuration.area)
 	 */
 	public static String getConfigurationDirectory() {
 		return OSGIUtils.getDefault().getConfigurationLocation().getURL().toString().substring(5);
 	}
-
+	
 	public static void writeStartupCorporaDiagnostics(File checkupResultFile) {
 		
 		Log.warning(NLS.bind("TXM was not correctly closed, see the report in the ''{0}'' file", checkupResultFile.getAbsolutePath()));
@@ -850,7 +852,7 @@
 		IProject projects[] = rcpWorkspace.getRoot().getProjects();
 		
 		for (IProject rcpProject : projects) {
-
+			
 			if (rcpProject.equals(corporaDirectory)) continue;
 			
 			String s1 = rcpProject.getLocationURI().toString();
@@ -862,45 +864,59 @@
 			}
 			
 			org.txm.objects.Project project = Toolbox.workspace.getProject(rcpProject.getName().toUpperCase());
-		
+			
 			if (project == null) {
 				builder.append("Corpus Project: "+rcpProject.getName()+" not found.\n\n");
 				continue;
 			}
 			
-			File indexes = new File(project.getProjectDirectory(), "data/"+project.getName());
-			if (indexes.exists()) {
-				if (indexes.listFiles().length == 0) {
-					builder.append(" no CQP data files in directory: "+indexes.getAbsolutePath());
-					builder.append("\n");
-				}
-			} else {
-				builder.append(" no CQP data directory: "+indexes.getAbsolutePath());
+			CorpusBuild corpus = project.getCorpusBuild(project.getName().toUpperCase());
+			if (corpus == null) {
+				builder.append(" no CQP corpus with name: "+project.getName().toUpperCase());
+				builder.append("  the import was not done or failed");
 				builder.append("\n");
 			}
 			
-			builder.append("Project: "+project.getName()+" at "+project.getProjectDirectory());
-			builder.append("\n");
-			builder.append(" creation: "+project.getCreationDate());
-			builder.append("\n");
-			builder.append(" update: "+project.getLastComputingDate());
-			builder.append("\n");
-			builder.append(" 'default' edition: "+project.getEditionDefinition("default"));
-			builder.append("\n");
-			builder.append(" 'facs' edition: "+project.getEditionDefinition("facs"));
-			builder.append("\n");
-			builder.append(" 'preferences': "+TXMPreferences.dumpToString(project.getParametersNodePath()));
-			builder.append("\n");
+			List<?> errors = corpus.isBuildValid();
+			if (errors != null && errors.size() > 0) {
+				builder.append(" corpus built failed with file errors: "+errors);
+				builder.append("  the import or update failed");
+				builder.append("\n");
+			}
 			
-			builder.append(" Results: ");
-			builder.append("\n");
-			for (TXMResult result : project.getDeepChildren()) {
-				builder.append("  "+result.getName()+" ("+result.getResultType()+"): "+result.getSimpleDetails());
+			String error = corpus.isReady();
+			if (error != null && error.length() > 0) {
+				builder.append(" corpus is not ready: "+error);
+				builder.append("  the import or update failed");
 				builder.append("\n");
-				builder.append("  'preferences': "+TXMPreferences.dumpToString(result.getParametersNodePath()));
+			}
+	
+			
+			if (Log.getLevel().intValue() < Level.INFO.intValue()) { // print more details if log level is lower than INFO
+				
+				builder.append("Project: "+project.getName()+" at "+project.getProjectDirectory());
 				builder.append("\n");
+				builder.append(" creation: "+project.getCreationDate());
+				builder.append("\n");
+				builder.append(" update: "+project.getLastComputingDate());
+				builder.append("\n");
+				builder.append(" 'default' edition: "+project.getEditionDefinition("default"));
+				builder.append("\n");
+				builder.append(" 'facs' edition: "+project.getEditionDefinition("facs"));
+				builder.append("\n");
+				builder.append(" 'preferences': "+TXMPreferences.dumpToString(project.getParametersNodePath()));
+				builder.append("\n");
+				
+				builder.append(" Results: ");
+				builder.append("\n");
+				for (TXMResult result : project.getDeepChildren()) {
+					builder.append("  "+result.getName()+" ("+result.getResultType()+"): "+result.getSimpleDetails());
+					builder.append("\n");
+					builder.append("  'preferences': "+TXMPreferences.dumpToString(result.getParametersNodePath()));
+					builder.append("\n");
+				}
+				builder.append("\n");
 			}
-			builder.append("\n");
 		}
 		
 		IOUtils.write(checkupResultFile, builder.toString());
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/export/ExportTextsMetadataMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/export/ExportTextsMetadataMacro.groovy	(revision 3436)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/export/ExportTextsMetadataMacro.groovy	(revision 3437)
@@ -15,8 +15,8 @@
 
 // PARAMETERS
 
-@Field @Option(name="tsvFile", usage="CSV file path", widget="File", required=true, def="/tmp/metadata.csv")
-def File tsvFile
+@Field @Option(name="csvFile", usage="CSV file path", widget="File", required=true, def="/tmp/metadata.csv")
+def File csvFile
 
 @Field @Option(name="columnSeparator", usage="column columnSeparator", widget="String", required=false, def="\t")
 def columnSeparator
@@ -26,10 +26,10 @@
 // BEGINNING
 CQPCorpus corpus = corpusViewSelection
 def CQI = CQPSearchEngine.getCqiClient()
-def writer = tsvFile.newWriter("UTF-8")
+def writer = csvFile.newWriter("UTF-8")
 def internalTextProperties = ["project", "base", "path"]
 
-println "Exporting $corpus metadata to $tsvFile file."
+println "Exporting $corpus metadata to $csvFile file."
 
 def text = corpus.getStructuralUnit("text")
 def properties = text.getProperties()
@@ -58,7 +58,7 @@
 	propertyValues[property] = values
 }
 
-// writing result to tsvFile
+// writing result to csvFile
 def c = 0
 properties.each { property ->
 	if (!internalTextProperties.contains(property.getName())) {
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/xml/XMLStatisticsMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/xml/XMLStatisticsMacro.groovy	(revision 3436)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/xml/XMLStatisticsMacro.groovy	(revision 3437)
@@ -8,8 +8,8 @@
 @Field @Option(name="inputDirectory", usage="Dossier qui contient les fichiers à parser", widget="Folder", required=true, def="src")
 File inputDirectory;
 
-@Field @Option(name="tsvFile", usage="FichierTSV résultat", widget="File", required=true, def="file.tsv")
-File tsvFile;
+@Field @Option(name="csvFile", usage="FichierTSV résultat", widget="File", required=true, def="file.tsv")
+File csvFile;
 
 @Field @Option(name="usePaths", usage="FichierTSV résultat", widget="Boolean", required=true, def="false")
 def usePaths = true
@@ -20,11 +20,11 @@
 
 if (!ParametersDialog.open(this)) return;
 
-tsvFile = tsvFile.getAbsoluteFile()
+csvFile = csvFile.getAbsoluteFile()
 println "Input directory: "+inputDirectory
-println "TSV file: "+tsvFile
+println "CSV file: "+csvFile
 println "use paths $usePaths"
 println "use attributes $useAttributes"
 println "use attributes values $useAttributeValues"
 
-XMLStatistics.processDirectory(inputDirectory, tsvFile, ".xml", usePaths, useAttributes, useAttributeValues);
\ No newline at end of file
+XMLStatistics.processDirectory(inputDirectory, csvFile, ".xml", usePaths, useAttributes, useAttributeValues);
\ No newline at end of file
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/InjectWordPropTableMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/InjectWordPropTableMacro.groovy	(revision 3436)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/InjectWordPropTableMacro.groovy	(revision 3437)
@@ -9,6 +9,7 @@
 
 import groovy.transform.Field
 
+import org.txm.core.preferences.TBXPreferences
 import org.txm.rcp.swt.widget.parameters.*
 
 @Field @Option(name="inputDirectory", usage="The XML-TXM folder", widget="Folder", required=true, def="")
@@ -17,8 +18,8 @@
 @Field @Option(name="outputDirectory", usage="The result folder", widget="Folder", required=true, def="")
 def outputDirectory
 
-@Field @Option(name="tsvFile", usage="The annotation TSV file", widget="FileOpen", required=true, def="")
-def tsvFile
+@Field @Option(name="csvFile", usage="The annotation TSV file", widget="FileOpen", required=true, def="")
+def csvFile
 
 @Field @Option(name="properties", usage="columns to inject separated by commas", widget="String", required=true, def="p1, p2, ... , pn")
 def properties
@@ -39,7 +40,7 @@
 println "Injecting annotations with the following parameters:"
 println "- inputDirectory: $inputDirectory"
 println "- outputDirectory: $outputDirectory"
-println "- tsvFile: $tsvFile"
+println "- csvFile: $csvFile"
 println "- properties: $properties"
 
 outputDirectory.mkdir()
@@ -48,7 +49,8 @@
 	return false
 }
 
-CsvReader records = new CsvReader(tsvFile.getAbsolutePath(), "\t".charAt(0), Charset.forName("UTF-8"))
+String separator = TBXPreferences.getInstance().getString(TBXPreferences.EXPORT_COL_SEPARATOR);
+CsvReader records = new CsvReader(csvFile.getAbsolutePath(), separator.charAt(0), Charset.forName("UTF-8"))
 records.setTextQualifier((char)0)
 records.readHeaders();
 
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/BuildWordPropTableMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/BuildWordPropTableMacro.groovy	(revision 3436)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/BuildWordPropTableMacro.groovy	(revision 3437)
@@ -31,6 +31,7 @@
 import org.txm.searchengine.cqp.corpus.query.*
 import org.txm.concordance.core.functions.Concordance
 import org.txm.concordance.core.functions.Line
+import org.txm.core.preferences.TBXPreferences
 import org.txm.functions.concordances.*
 import org.txm.functions.concordances.comparators.*
 import org.txm.searchengine.cqp.ReferencePattern
@@ -64,8 +65,8 @@
 @Field @Option(name="references", usage="references to show", widget="String", required=true, def="text_id")
 		def references
 
-@Field @Option(name="tsvFile", usage="The result TSV file", widget="FileSave", required=true, def="export.tsv")
-		def tsvFile
+@Field @Option(name="csvFile", usage="The result TSV file", widget="FileSave", required=true, def="export.tsv")
+		def csvFile
 
 if (!ParametersDialog.open(this)) return;
 
@@ -82,11 +83,11 @@
 println "- query: $query"
 println "- annotation properties: $properties"
 println "- references: $properties"
-println "- TSV file: $tsvFile"
+println "- CSV file: $csvFile"
 
-tsvFile = tsvFile.getAbsoluteFile()
-if (!tsvFile.getParentFile().canWrite()) {
-	println "Error: "+tsvFile.getParentFile()+" is not writable."
+csvFile = csvFile.getAbsoluteFile()
+if (!csvFile.getParentFile().canWrite()) {
+	println "Error: "+csvFile.getParentFile()+" is not writable."
 	return;
 }
 
@@ -145,13 +146,14 @@
 concordance.compute()
 //println "Conc done "+(System.currentTimeMillis()-start)
 
-def writer = tsvFile.newWriter("UTF-8");
+def writer = csvFile.newWriter("UTF-8");
 
 //println "Writing lines..."
 start = System.currentTimeMillis()
 String annotHeader = ""
-for (def annot : annots) annotHeader += "\t$annot"
-writer.write("N"+"\t"+"Références"+"\t"+"ContexteGauche"+"\t"+"Pivot"+annotHeader+"\t"+"ContexteDroit"+"\t"+"id"+"\t"+"text_id\n")
+String separator = TBXPreferences.getInstance().getString(TBXPreferences.EXPORT_COL_SEPARATOR);
+for (def annot : annots) annotHeader += "$separator$annot"
+writer.write("N"+separator+"Références"+separator+"ContexteGauche"+separator+"Pivot"+annotHeader+separator+"ContexteDroit"+separator+"id"+separator+"text_id\n")
 
 // define which occurrence properties will be displayed
 concordance.setViewProperties([word])
@@ -176,15 +178,15 @@
 
 		String poss = "";
 		for (def annot : annots) {
-			poss += "\t"+l.getViewRef().getValue(annot)
+			poss += separator+l.getViewRef().getValue(annot)
 		}
 
 		//println l.getKeywordsViewProperties().get(pos)
-		writer.write(""+(l.getKeywordPosition())+"\t"+refValue+"\t"+lcontext+"\t"+pivot+poss+"\t"+rcontext+"\t"+ids+"\t"+ntext+"\n")
+		writer.write(""+(l.getKeywordPosition())+separator+refValue+separator+lcontext+separator+pivot+poss+separator+rcontext+separator+ids+separator+ntext+"\n")
 	}
 	writer.flush()
 }
-println "Saved in "+tsvFile.getAbsolutePath()
+println "Saved in "+csvFile.getAbsolutePath()
 writer.close()
 
 concordance.delete()
Index: TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/ExportWordPropertiesToTableMacro.groovy
===================================================================
--- TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/ExportWordPropertiesToTableMacro.groovy	(revision 3436)
+++ TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/macro/annotation/ExportWordPropertiesToTableMacro.groovy	(revision 3437)
@@ -31,6 +31,7 @@
 import org.txm.searchengine.cqp.corpus.query.*
 import org.txm.concordance.core.functions.Concordance
 import org.txm.concordance.core.functions.Line
+import org.txm.core.preferences.TBXPreferences
 import org.txm.functions.concordances.*
 import org.txm.functions.concordances.comparators.*
 import org.txm.searchengine.cqp.ReferencePattern
@@ -64,8 +65,8 @@
 @Field @Option(name="references", usage="references to show", widget="String", required=true, def="text_id")
 		def references
 
-@Field @Option(name="tsvFile", usage="The result TSV file", widget="FileSave", required=true, def="export.tsv")
-		def tsvFile
+@Field @Option(name="csvFile", usage="The result TSV file", widget="FileSave", required=true, def="export.tsv")
+		def csvFile
 
 if (!ParametersDialog.open(this)) return;
 
@@ -82,11 +83,11 @@
 println "- query: $query"
 println "- annotation properties: $properties"
 println "- references: $properties"
-println "- TSV file: $tsvFile"
+println "- CSV file: $csvFile"
 
-tsvFile = tsvFile.getAbsoluteFile()
-if (!tsvFile.getParentFile().canWrite()) {
-	println "Error: "+tsvFile.getParentFile()+" is not writable."
+csvFile = csvFile.getAbsoluteFile()
+if (!csvFile.getParentFile().canWrite()) {
+	println "Error: "+csvFile.getParentFile()+" is not writable."
 	return;
 }
 
@@ -145,13 +146,14 @@
 concordance.compute()
 //println "Conc done "+(System.currentTimeMillis()-start)
 
-def writer = tsvFile.newWriter("UTF-8");
+def writer = csvFile.newWriter("UTF-8");
 
 //println "Writing lines..."
 start = System.currentTimeMillis()
 String annotHeader = ""
+String separator = TBXPreferences.getInstance().getString(TBXPreferences.EXPORT_COL_SEPARATOR);
 for (def annot : annots) annotHeader += "\t$annot"
-writer.write("N"+"\t"+"Références"+"\t"+"ContexteGauche"+"\t"+"Pivot"+annotHeader+"\t"+"ContexteDroit"+"\t"+"id"+"\t"+"text_id\n")
+writer.write("N"+separator+"Références"+separator+"ContexteGauche"+separator+"Pivot"+annotHeader+separator+"ContexteDroit"+separator+"id"+separator+"text_id\n")
 
 // define which occurrence properties will be displayed
 concordance.setViewProperties([word])
@@ -176,15 +178,15 @@
 
 		String poss = "";
 		for (def annot : annots) {
-			poss += "\t"+l.getViewRef().getValue(annot)
+			poss += separator+l.getViewRef().getValue(annot)
 		}
 
 		//println l.getKeywordsViewProperties().get(pos)
-		writer.write(""+(l.getKeywordPosition())+"\t"+refValue+"\t"+lcontext+"\t"+pivot+poss+"\t"+rcontext+"\t"+ids+"\t"+ntext+"\n")
+		writer.write(""+(l.getKeywordPosition())+separator+refValue+separator+lcontext+separator+pivot+poss+separator+rcontext+separator+ids+separator+ntext+"\n")
 	}
 	writer.flush()
 }
-println "Saved in "+tsvFile.getAbsolutePath()
+println "Saved in "+csvFile.getAbsolutePath()
 writer.close()
 
 concordance.delete()
Index: TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/handlers/SendIndexTo.java
===================================================================
--- TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/handlers/SendIndexTo.java	(revision 3436)
+++ TXM/trunk/org.txm.index.rcp/src/org/txm/index/rcp/handlers/SendIndexTo.java	(revision 3437)
@@ -96,9 +96,15 @@
 				}
 				if (subcorpus == null) {
 					//subcorpus = corpus.createSubcorpus(cqlQuery, cqlQuery.getQueryString());
-					subcorpus = new Subcorpus(index);
-					subcorpus.compute(false);
-					index.setUserPersistable(true); // make the index persistable to avoid bugs later
+					subcorpus = new Subcorpus(index) {
+						public boolean isInternalPersistable() { // change the corpus behavior
+							return false;
+						}
+					};
+					subcorpus.compute(false); // make it ready
+					subcorpus.setUserPersistable(false);
+					
+					//index.setUserPersistable(true); // make the index persistable to avoid bugs later
 				}
 			}
 			catch (Exception e) {
Index: TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java
===================================================================
--- TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java	(revision 3436)
+++ TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/MainCorpus.java	(revision 3437)
@@ -33,6 +33,7 @@
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -695,4 +696,46 @@
 		}
 		return textids;
 	}
+	
+	public File getRegistryFile() {
+		return registryFile;
+	}
+	
+	public File getDataDirectory() {
+		return dataDirectory;
+	}
+
+	@Override
+	public List<String> isBuildValid() {
+		
+		LinkedList<String> errors = new LinkedList<>();
+		
+		if (!dataDirectory.exists()) {
+			errors.add("no data directory: "+dataDirectory);
+		}
+		
+		//File registryFile = new File(this.registryFile);
+		if (!registryFile.exists()) {
+			errors.add("no registry file: "+registryFile);
+		}
+		
+		errors.addAll(new ReadRegistryFile(registryFile).isCorpusBuildValid(dataDirectory));
+		
+		return errors;
+	}
+
+	@Override
+	public String isReady() {
+		
+		if (!hasBeenComputedOnce()) return "the Maincorpus is not a computed TXMResult";
+		
+		try {
+			int s = this.getSize();
+			if (s >= 0) return null;
+			return "negative size";
+		}
+		catch (CqiClientException e) {
+			return e.getMessage();
+		}
+	}
 }
Index: TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Subcorpus.java
===================================================================
--- TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Subcorpus.java	(revision 3436)
+++ TXM/trunk/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/Subcorpus.java	(revision 3437)
@@ -30,7 +30,9 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.UUID;
 
@@ -781,7 +783,27 @@
 			return this.getName() + " (" + this.getQualifiedCqpId() + ")";
 		}
 	}
-	
-	
-	
+
+	@Override
+	public List<?> isBuildValid() {
+		
+		if (this.getParent() != null) return new LinkedList<String>(); // ok
+		
+		return Arrays.asList("No parent corpus result");
+	}
+
+	@Override
+	public String isReady() {
+		
+		if (!hasBeenComputedOnce()) return "the subcorpus is not a computed TXMResult";
+		
+		try {
+			int s = this.getSize();
+			if (s >= 0) return null;
+			return "negative size";
+		}
+		catch (CqiClientException e) {
+			return e.getMessage();
+		}
+	}
 }
Index: TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java
===================================================================
--- TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 3436)
+++ TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 3437)
@@ -239,14 +239,24 @@
 						if (new File("txm_was_not_closed_correctly.lock").exists()) { // the close control file was not deleted
 							
 							File checkupResultFile = new File("startup_diagnostic_"+Toolbox.dateformat.format(new Date())+".txt");
-							Toolbox.writeStartupCorporaDiagnostics(checkupResultFile);
 							this.syncExec(new Runnable() {
 								@Override
 								public void run() {
-									org.txm.rcp.handlers.files.EditFile.openfile(checkupResultFile);
+									int choice = MessageDialog.open(MessageDialog.QUESTION_WITH_CANCEL, Display.getDefault().getActiveShell(),
+											"TXM was not correctly stopped", 
+											NLS.bind("Do you want to start a diagnostic of your corpora?\n\n(the diagnostic will be saved in the ''{0}'' file, the path will be copied in the clipboard)", checkupResultFile)
+											, SWT.NONE, new String[] {"Cancel", "OK", "OK, open the diagnostic file"});
+									
+									if (choice != 0) {
+										Toolbox.writeStartupCorporaDiagnostics(checkupResultFile);
+									}
+									
+									if (choice == 2) {
+										org.txm.rcp.handlers.files.EditFile.openfile(checkupResultFile);
+									}
+									
 								}
 							});
-							
 							new File("txm_was_not_closed_correctly.lock").delete();
 						}
 						new File("txm_was_not_closed_correctly.lock").createNewFile();
@@ -306,7 +316,7 @@
 	public static String getTXMStartMessage() {
 		
 		String pretty_version =  getTXMVersionPrettyString();
-			return NLS.bind(TXMUIMessages.startingUpP0, pretty_version);
+		return NLS.bind(TXMUIMessages.startingUpP0, pretty_version);
 		
 	}
 	
Index: TXM/trunk/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/player/HTMLPlayer.java
===================================================================
--- TXM/trunk/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/player/HTMLPlayer.java	(revision 3436)
+++ TXM/trunk/org.txm.backtomedia.rcp/src/org/txm/backtomedia/editors/player/HTMLPlayer.java	(revision 3437)
@@ -50,12 +50,17 @@
 		
 		browser = new Browser(this, SWT.NONE);
 		browser.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
-		//browser.setText("<!DOCTYPE html><html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"></head><body><video id=\"video\" controls></video></body></html>");
-		String html = "<!DOCTYPE html><html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"></head><body><video id=\"video\" style=\"object-fit:contain;\" controls controlsList=\"nofullscreen\"></video></body></html>";
-		System.out.println(html);
-		browser.setText(html);
-		//browser.setText("<video id=\"video\" width=\"100%\" height=\"100%\" controls><source id=\"source\" src=\"\"></source></video>");
 		
+		// use flex  to center the video
+		// use ondataload fix the video size depending on its ratio and the viewport height
+		// diable the fullscreen button, use a CSS special rule for webkit
+		String html = "<!DOCTYPE html><html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n" + 
+				"<style>video::-webkit-media-controls-fullscreen-button {display: none;</style></head>\n" + 
+				"<body><div style=\"display:flex;align-items: center;justify-content: center;\">\n" + 
+				"<video id=\"video\" controls controlsList=\"nofullscreen nodownload\" onloadeddata=\"v = document.getElementById('video');r = v.videoWidth/v.videoHeight; v.style.width=(95*r)+'vh';\"></video></div></body></html>";
+		
+		browser.setText(html); // <source> is set later
+		
 		browser.addProgressListener(new ProgressListener() {
 			
 			@Override
