Ensure api rootdir is a variable in wrapper