Merge "Fix a few bugs related to dumping files."