environment: write new keys in consistent order