Add onComplete functionality to TypedPipe