trying buffered write