Move custom path check into NodeEnvironment