protected void writeDOTFile(Grammar g, String name, String dot) throws IOException {
		Writer fw = getOutputFileWriter(g, name + ".dot");
		try {
			fw.write(dot);
		}
		finally {
			fw.close();
		}
	}
@since 4.7.1 in response to -Xexact-output-dir
tool/src/org/antlr/v4/Tool.java