added result dumper

dumps query+data to a local file so the run can be resumed in the event of
a crash