Remove graphviz module dependency and write file directly.