various improvements

move output validation outside of main loop

simplify interface to benchUnmarshal

fix string generation (some generated strings were not marshalable by
the json package)