private static void storeResult(List<Cluster> clusters,
			String resultFilename) {
		if(clusters == null){
			return;
		}
		Collections.sort(clusters);
		Map<Integer, AtomicInteger> sizeCount = new TreeMap<Integer, AtomicInteger>();
		int counter = 0;
		try (Writer writer = new BufferedWriter(new FileWriter(resultFilename))) {	
			System.out.print("Cluster sizes: ");
			for (Cluster cluster : clusters) {
				if (cluster.getAllMembers().size() < 3) {
					continue;
				}
				Integer currClusterSize = cluster.getAllMembers().size();
				//System.out.print(cluster.getAllMembers().size() + " ");
				if(sizeCount.get(currClusterSize) == null){
					AtomicInteger count = new AtomicInteger(1);
					sizeCount.put(currClusterSize , count);
				}else{
					sizeCount.get(currClusterSize).incrementAndGet();
				}
				for (String node : cluster.getAllMembers()) {
					// System.out.print(node + " ");
					writer.write(" " + node);
				}
				counter++;
				writer.write(System.lineSeparator());
				// System.out.println();
			}
			System.out.println(sizeCount);
			writer.flush();
		} catch (IOException e) {
			System.err.println(e.getMessage());
		}
		//System.out.println("Cluster count for each size, s.t. size => count");
		System.out.println("Total clusters: " + counter);
	}