public boolean execute() {
try {	
	updateGraph();
	
	System.out.print(name+": ");
	
	// initialize output streams
	FileOutputStream fos = null;
	PrintStream pstr = System.out;
	if( baseName != null )
	{
		String fname = fng.nextCounterName();
		fos = new FileOutputStream(fname);
		System.out.println("writing to file "+fname);
		pstr = new PrintStream(fos);
	}
	else	System.out.println();
	
	if( format.equals("neighborlist") )
		GraphIO.writeNeighborList(g, pstr);
	else if( format.equals("edgelist") )
		GraphIO.writeEdgeList(g, pstr);
	else if( format.equals("chaco") )
		GraphIO.writeChaco(g, pstr);
	else if( format.equals("netmeter") )
		GraphIO.writeNetmeter(g, pstr);
	else if( format.equals("gml") )
		GraphIO.writeGML(g, pstr);
	else if( format.equals("dot") )
		GraphIO.writeDOT(g, pstr);
	else
		System.err.println(name+": unsupported format "+format);
	
	if( fos != null ) fos.close();
	
	return false;
}
catch( IOException e )
{
	throw new RuntimeException(e);
}
}