Replace os.getcwd with env.cwd