Changed output summary ttree to a disk resident ttree instead of a memory resident ttree.
This should solve the bad_alloc error.