$rootDir definition adjusted. Not sure why this changed/stopped working from the original, but now works correctly