abstract out rootDir