useful error messages for failure to dump

@jenseng