added code to generate a GraphML output file