* onDisk: Make save_resource more robust to errors.