Index: /other-projects/maori-lang-detection/src/org/greenstone/atea/CountryCodeCountsMapData.java
===================================================================
--- /other-projects/maori-lang-detection/src/org/greenstone/atea/CountryCodeCountsMapData.java	(revision 33980)
+++ /other-projects/maori-lang-detection/src/org/greenstone/atea/CountryCodeCountsMapData.java	(revision 33981)
@@ -37,4 +37,10 @@
 
 import org.greenstone.util.SafeProcess;
+
+// copying to clipboard
+import java.awt.Toolkit;
+import java.awt.datatransfer.StringSelection;
+import java.awt.datatransfer.Clipboard;
+
 
 /**
@@ -702,7 +708,9 @@
 	// https://developer.mozilla.org/en-US/docs/Tools/Browser_Console
 	String webConsoleCommand = ":screenshot --selector \".map\" --file --filename \"" + outputFilePath + "\"";	
-	System.out.println("Run in Firefox web console's command line:");
+	System.out.println("The following command should be copied to your clipboard. Else copy it.");
+	System.out.println("Run it in the opened Firefox tab's Web Console command line (press F12 and undock web console first):\n");
 	System.out.println(webConsoleCommand);
-	
+	copyStringToCopyBuffer(webConsoleCommand);
+	    
 	// Launch firefox in a new tab
 	// https://askubuntu.com/questions/57163/how-to-open-an-url-from-command-line-to-firefox-and-switch-to-tab
@@ -727,9 +735,19 @@
 	    logger.info("Process err: " + proc.getStdError());
 	    logger.info("Screenshot process returned with: " + retVal);
-	}
-
+	}	
+	
 	return webConsoleCommand;
     }
 
+    /** Copies string to copy buffer. Works for me in Firefox on Ubuntu.
+     * Code from https://stackoverflow.com/questions/3591945/copying-to-the-clipboard-in-java
+     */
+    public void copyStringToCopyBuffer(String str) {
+	StringSelection selection = new StringSelection(str);
+	Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+	clipboard.setContents(selection, selection);
+    }
+    
+    // Doesn't work
     public String geoJsonMapScreenshot(File outputFolder, String fileNamePrefix) {
 	// https://stackoverflow.com/questions/49606051/how-to-take-a-screenshot-in-firefox-headless-selenium-in-java
Index: /other-projects/maori-lang-detection/src/org/greenstone/atea/SummaryTool.java
===================================================================
--- /other-projects/maori-lang-detection/src/org/greenstone/atea/SummaryTool.java	(revision 33980)
+++ /other-projects/maori-lang-detection/src/org/greenstone/atea/SummaryTool.java	(revision 33981)
@@ -189,5 +189,6 @@
 	if(outFile.exists()) {
 	    logger.error("WARN: Full web page urls list file already exists: " + fullFileName);
-	    logger.error("      Will not overwrite. Delete file manually and re-run this program.");
+	    logger.error("      Will not overwrite as it may already have been processed.");
+	    logger.error("      If you're sure, rename/delete the file manually and re-run this program.");
 	    return;
 	}
@@ -356,6 +357,8 @@
      */
     public static void main(String args[]) {
+	boolean doDebug = false;
+	
 	int oldDebugMode = SafeProcess.DEBUG;
-	SafeProcess.DEBUG = 0;
+	SafeProcess.DEBUG = doDebug ? 1 : 0;
 
 	if(args.length >= 2) {
@@ -366,4 +369,5 @@
 	try (
 	     MongoDBQueryer mongodb = new MongoDBQueryer();
+	     BufferedReader systemIn = new BufferedReader(new InputStreamReader(System.in, "UTF-8"));
 	     ) {
 
@@ -397,5 +401,5 @@
 	    } else {		
 
-		// calculating sample size works:
+		// TEST: calculating sample size works:
 		//System.err.println("For N = " + 4360 + ", n = " + listing.calcSampleSize(4360));
 		//System.err.println("For N = " + 681 + ", n = " + listing.calcSampleSize(681));
@@ -434,21 +438,22 @@
 		    String geoJsonFilename = mapData.writeFeaturesGeoJsonToFile(CountryCodeCountsMapData.SUPPRESS_MAPDATA_DISPLAY);
 		    
-
-		    /*
-		    // Ensure the geo-json file generated exists
+		    // Ensuring the geo-json file generated exists
 		    //String geoJsonFilename = outFolder + File.separator
-		    //+ GEOJSON_FEATURES_FILE_PREFIX + tablefilename;
-		    
+		    //+ GEOJSON_FEATURES_FILE_PREFIX + tablefilename;		    
 		    File geoJsonFile = new File(geoJsonFilename);
 		    if(!geoJsonFile.exists()) {
 			logger.info("@@@ geoJson file " + geoJsonFilename + " not generated!");
-			continue;
-		    }
-		    */
-		    logger.info("**** Wrote mapdata to file " + geoJsonFilename);
-		    //logger.info("     Paste the file's geojson contents into "
-		    //+ "the editor at " + CountryCodeCountsMapData.GEOJSON_MAP_TOOL_URL
-		    //+ " to see the data arranged on a world map");		    
-		    logger.info("Total count for query: " + mapData.getTotalCount());
+			//continue;
+		    }
+		    else {
+			if(doDebug) {
+			    logger.info("**** Wrote mapdata to file " + geoJsonFilename);
+			    //logger.info("     Paste the file's geojson contents into "
+			    //+ "the editor at " + CountryCodeCountsMapData.GEOJSON_MAP_TOOL_URL
+			    //+ " to see the data arranged on a world map");
+			    logger.info("Total count for query: " + mapData.getTotalCount());
+			}
+		    }		    
+		    
 		    
 		    // Running the command:
@@ -456,30 +461,37 @@
 		    // to confirm if the JSON in the provided json file parses/is valid JSON.
 
-		    /*
+		    
 		    String[] cmdArgs = {"python", "-mjson.tool", geoJsonFilename};
 		    SafeProcess p = new SafeProcess(cmdArgs);
 		    int retVal = p.runProcess();
-		    logger.info("\nJson validation tool returned with value: " + retVal);
-		    if(retVal == 0) {
-			logger.info("Valid geo json.");
-		    } else {
+
+		    if(retVal != 0) {
+			logger.info("\nJson validation tool returned with value: " + retVal);
 			logger.error("   std out: " + p.getStdOutput());
 			logger.error("   std err: " + p.getStdError());
 			logger.error("INVALID geo json generated. Not attempting screenshot of map.");
+			logger.info("");
 			continue;
 		    }
-		    */
-		    
-		    /*boolean uriEncoded = true;
-		    String mapDataEncodedStr = mapData.getFeaturesGeoJsonString(uriEncoded);
-		    logger.info("Encoded string: " + mapDataEncodedStr);
-		    */
+		    
 		    
 		    //logger.info("Data URL string: " + mapData.getAsMapURL());
 		    logger.info("");
 		    //mapData.geoJsonMapScreenshot(outFolder, tablefilename);
-		    mapData.getGeoJSONMapScreenshotCommand(outFolder, tablefilename);
+		    mapData.getGeoJSONMapScreenshotCommand(outFolder, tablefilename.replace(".json", ""));
 		    logger.info("---");
 
+
+		    System.out.println("Press Enter to continue >");
+		    String userEntered = "";
+		    while((userEntered = systemIn.readLine()) != null) {
+			if(userEntered.equals("")) { // line read and empty
+			    break;
+			}
+			else {			    		    
+			    System.out.println("Press Enter to continue >");
+			}
+		    }
+		    
 		    // TODO: Remove break. For debugging: breaks after first table -> map conversion.
 		    //break;
