moving duplicate warning to trace
dbwriter now prints statistics