refactored EnvVar dictionary and build deploy.dir