Refactored duplicated reportResults function and improved logging on failures. Thanks to hartmanng@chromium.org for pointing this out.
Merge pull request #692 from kenrussell/better-error-logging

Refactored duplicated reportResults function and improved logging on fai...