added logging to batchsave