Add memory dumps at end of run. Needs to be more nuanced in future.