KVDBs can now output stats

IoDB can now output stats. Also fixed issue where some
segments where not being skipped.