open->write->close stream