wait for main thread to stop pipeline before returning in the error cb. seems to work.. may be nicer not to polute with unneccesary errors.