correct packageDir into packageRoot