ensure resource is saved