if wstream not finish, need to wait for write stream finish