Add err to handleDoneState in tests/runner.js