added optional tracing of re-attempted batches. disabled by default