Fixed batched dumps, encrypt histogram, autodetect max id