@Override
	public FileVisitResult postVisitDirectory(Path dir, IOException exc)
			throws IOException {
		if (dir.toString().equalsIgnoreCase(ROOTDIR))
			return CONTINUE;
		String name = "" + dir;
		String[] comps = name.split("/");
		String tmp = comps[comps.length - 1].toLowerCase();
		
		if (related.length == 0) {
			p.addColumn(tmp, Printer.Type.BOTH);
		} else {
			p.addColumn(StringUtils.join(related, " "), Printer.Type.BOTH);
		}
		
		if (this.docs.documents.size() > 5000 ) {
			System.out.println("Too many files, skipping");
			p.addColumn(docs.documents.size(), Printer.Type.BOTH);
			p.addColumn(docs.numSentences(), Printer.Type.BOTH);								
			p.addColumn("0", Printer.Type.BOTH);
			p.addColumn("0", Printer.Type.TIMING);
			p.addColumn("Too Large", Printer.Type.TEXT);
			p.endRow();
			return CONTINUE;
		}
		
		
		File file = new File("LexRankFiles/Input");        
        String[] myFiles = file.list();  
        for (int i=0; i<myFiles.length; i++) {  
            File myFile = new File(file, myFiles[i]);   
            myFile.delete();  
        }   
        System.out.println(file.list().length);
        file = new File("Results/LexRank.INPU");
        if (file.exists()) {
        	file.delete();
        } else { 
        	System.out.println("Missing file");
        }
		int i = 0;
		
		for (Document d: this.docs.documents) {
			// Write Vocab
	    	file = new File("LexRankFiles/Input", ""+i);
			FileWriter fw = new FileWriter(file.getAbsoluteFile());
			BufferedWriter bw = new BufferedWriter(fw);
			
			bw.write("<DOC>\n");
			bw.write("<DOCNO>\n");
			bw.write(i + "\n");
			bw.write("</DOCNO>\n");
			bw.write("<DOCTYPE>NEWS</DOCTYPE>\n");
			bw.write("<TXTTYPE>NEWSWIRE</TXTTYPE>\n");
			bw.write("<TEXT>" + d.text + "</TEXT>\n");
			bw.write("</DOC>");			
			bw.close();
			i++;
		}		
		String[] cmd = { "java", "dragon.config.SummarizationEvaAppConfig", "/home/graveendran/workspace/StanfordNLPTest/sumcfg2005.xml",  "1" };
        Process proc;				
		proc = new ProcessBuilder(cmd).redirectError(Redirect.INHERIT).redirectOutput(Redirect.INHERIT).start();
        //proc = new ProcessBuilder(cmd).start();
        try {
			proc.waitFor();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("Done Execution");
		
		File f = new File("Results/LexRank.INPU");
		List<String> summary = new ArrayList<String>();
		if (f.exists()) {
			FileReader fr = new FileReader(f);
			BufferedReader br = new BufferedReader(fr);
			String line;
			 
			while ((line = br.readLine()) != null) {
				summary.add(line);
			}
			br.close();
		} else {
			summary.add("Missing summary");
			System.out.println("Failed");
		}
		
		
		p.addColumn(docs.documents.size(), Printer.Type.BOTH);
		p.addColumn(docs.numSentences(), Printer.Type.BOTH);
		
		long totalWords = 0;		
		long executionTime = System.currentTimeMillis() - dirStart;
		
		p.addColumn(totalWords, Printer.Type.BOTH);
		p.addColumn(executionTime, Printer.Type.TIMING);
		p.addColumn(StringUtils.join(summary, " ").trim(), Printer.Type.TEXT);
		p.endRow();
		return CONTINUE;
	}