greatly improved matR_batch_dl.r with logging