public void printDOT(String pathname) throws IOException {

		// requires DOT to be available in the shell

		Process process = Runtime.getRuntime().exec("dot -Tsvg");

		OutputStream stdin = process.getOutputStream();
		InputStream stderr = process.getErrorStream();
		InputStream stdout = process.getInputStream();

		BufferedWriter out = new BufferedWriter(new OutputStreamWriter(stdin));

		BufferedReader reader = new BufferedReader(
				new InputStreamReader(stdout));
		FileOutputStream fOut = new FileOutputStream(pathname);

		out.write("digraph blocktree {");

		for (UUID NodeID : lookup.keySet()) {
			Node nn = lookup.get(NodeID);

			out.write(formatDOTNode(nn));

			// a [label="Foo"];
		}

		traverseDOT(root, out);

		out.write("}");

		// Close the output stream
		out.close();

		// put it into the final file
		String line = reader.readLine();
		while (line != null) {
			fOut.write(line.getBytes());
			fOut.flush();
			line = reader.readLine();
		}

	}