Fixed code to detect COMPLETED/FAILED/KILLED state. 

...using for loop to continue. pollStatus command will now return back up the call stack.