Merge "dumpstate: improved collection, better error handling."