Add buffered write method