Updated ExportGraph to use the new graph format