fix writeStream redirect test