write current env