added a graph id and cleaned up hdf5 output