added wait for capture completion state to capture continually loop