Define step expecting resource not found; minor refactoring