Tweaked batch write, logging