write type derivation and graphviz dot file to separate output files