Currently this needs to be an environment variable, reading the argument just needs to move to before we depend on the targetRid.