def writeGraph(grph, name, edgeInfo = True, typing = False, suffix = 'csv', overwrite = True, allSameAttribute = False):
    progArgs = (0, "Writing the graph to files starting with: {}".format(name))
    if metaknowledge.VERBOSE_MODE:
        progKwargs = {'dummy' : False}
    else:
        progKwargs = {'dummy' : True}
    with _ProgressBar(*progArgs, **progKwargs) as PBar:
        if typing:
            if isinstance(grph, nx.classes.digraph.DiGraph) or isinstance(grph, nx.classes.multidigraph.MultiDiGraph):
                grphType = "_directed"
            else:
                grphType = "_undirected"
        else:
            grphType = ''
        nameCompts = os.path.split(os.path.expanduser(os.path.normpath(name)))
        if nameCompts[0] == '' and nameCompts[1] == '':
            edgeListName = "edgeList"+ grphType + '.' + suffix
            nodesAtrName = "nodeAttributes"+ grphType + '.' + suffix
        elif nameCompts[0] == '':
            edgeListName = nameCompts[1] + "_edgeList"+ grphType + '.' + suffix
            nodesAtrName = nameCompts[1] + "_nodeAttributes"+ grphType + '.' + suffix
        elif nameCompts[1] == '':
            edgeListName = os.path.join(nameCompts[0], "edgeList"+ grphType + '.' + suffix)
            nodesAtrName = os.path.join(nameCompts[0], "nodeAttributes"+ grphType + '.' + suffix)
        else:
            edgeListName = os.path.join(nameCompts[0], nameCompts[1] + "_edgeList"+ grphType + '.' + suffix)
            nodesAtrName = os.path.join(nameCompts[0], nameCompts[1] + "_nodeAttributes"+ grphType + '.' + suffix)
        if not overwrite:
            if os.path.isfile(edgeListName):
                raise OSError(edgeListName+ " already exists")
            if os.path.isfile(nodesAtrName):
                raise OSError(nodesAtrName + " already exists")
        writeEdgeList(grph, edgeListName, extraInfo = edgeInfo, allSameAttribute = allSameAttribute, _progBar = PBar)
        writeNodeAttributeFile(grph, nodesAtrName, allSameAttribute = allSameAttribute, _progBar = PBar)
        PBar.finish("{} nodes and {} edges written to file".format(len(grph.nodes()), len(grph.edges())))