Added function sinkStream.