checking both streams finish