goto cleanup for dump and patch