Add method WriteEnvVar