private void writeCSVFile(String outCSVFile) {

		Charset charset = Charset.forName("US-ASCII");
		try (BufferedWriter writer =  Files.newBufferedWriter(Paths.get(outCSVFile),charset)) {
			if (timeToPitch.size() > 0) {
				Iterator<String> keys = timeToPitch.keySet().iterator();
				for(int i=0; i<timeToPitch.size(); i++) {
					String time = keys.next();
					double freq = timeToPitch.get(time);
					if (freq > 0) {
						writer.append(sargamLabel.get(i));
						writer.append(",");
						writer.append(time);
						writer.append(",");
						writer.append(String.valueOf(freq));
						writer.append("\r\n");
					}
					if (i%1000 == 0) {
						writer.flush();
					}
				}
			}
			writer.flush();
		} catch (IOException e) {
			e.printStackTrace();
		} 
	}