Add GraphViz output feature
Add code to verify the script

Also rationalize error handling