Added closeStream