 process.on('SIGTERM',()->
     if clientProcess and not benchmarkFinished
         reportStats(clientProcess.stats.report2())
-        resultLogger "terminated"
-        process.exit(1)
+    resultLogger "terminated"
+    process.exit(1)
 )
        clientProcess.start()
        clientProcess.once("started", next)
        intervalObj = setInterval(()->
            benchmarkFinished = clientProcess.isStopped()
            reportStats(clientProcess.stats.report2())
            if not benchmarkFinished
                clientProcess.timeOutCheck()
            if benchmarkFinished
                clearInterval(intervalObj)
                sysMon.stop()
                resultLogger "stopped"
                process.exit(1)
        , 3000
        )
    (next)->

        @stop()

    stop : () ->
        @expect = null
        @expectStartTime = null
        @stopped = true
        # do not disconnect right away, continue counting server side events
        @emit('stopped')

    toJSON : ()->
