shutdown stream for read and write