skip writing the dot file if the graph has a cycle? Otherwise it'll fail anyway