public void recordClusterInfo(Cluster c){
		if (!isRecording) return;
		StringBuilder s = new StringBuilder();
		String filename = String.format("cluster_%1$s_%2$s_%3$s", name, iterationCounter,c.ID);
		s.append(filename+" =\n{\n");
		s.append(String.format("\tindex: %1$s,\n", c.ID));
		s.append("\twords: [");
		for (int i: c.words){
			s.append(" "+i+",");
		}
		//remove last comma
		s.deleteCharAt(s.length()-1);
		s.append(" ],\n");
		s.append("\tdistribution: [");
		for (double d1[] : c.clusterDistribution()){
			for (double d2: d1){
				s.append(String.format(" %1$-4f,", d2));
			}
		}
		s.deleteCharAt(s.length()-1);
		s.append(" ]\n}");
		File f = new File (currentPath, filename+".js");
		try {
			f.createNewFile();
			BufferedWriter out = new BufferedWriter(new FileWriter(f));
			out.append(s);
			out.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}