Replace process.cwd by currentDir