make graph file writing optional

we probably want to add a setter that can provide a filename...

this fourth pull-request may be the one you like the least, it is also the smallest  -- I don't think we should leave file behind unconditionally so I made it a compile-time option. We can easily make it run-time too.