chance example to use writeStream