redirect STDOUT via local scope to catch bad graph