//#ifdef debug
System.out.println("Writing " + path);
System.out.println(SGFWriter.toString(game.kifuHead()));
//#endif
FileConnection fc = (FileConnection) Connector.open("file://localhost/" + path);
OutputStream os = fc.openDataOutputStream();
OutputStreamWriter writer = new OutputStreamWriter(os);
SGFWriter.write(writer, game.kifuHead());
writer.close();
os.close();
//#ifdef debug