private static void writeMapData(BufferedWriter writer, int[] data) throws IOException {
		boolean first = true;
		for (int val : data) {
			if (first) {
				first = false;
				writer.write("" + val);
			}
			else {
				writer.write("," + val);
			}
		}
		writer.write("\n");
	}