Added debug printing of DAG.