Fixed xout streams not closed