write graphviz file