Write batches