Added task state change listener
Fixed state bug; parsing output; long pooling on task close - state change