Made the batch_save chunk size configurable.