Add callback for pipe