Minor refactoring to outputGraph on GraphMLWriter.