# The loader rewrote configuration files that did not match what the mod expects

Forge or NeoForge found keys missing or values out of range in a mod's configuration file and wrote them again with the mod's default values.

- Code: `config_corrected`
- Severity: warning
- Category: Configuration
- Server types: Forge, NeoForge
- Page: https://failures.perland.online/failures/config_corrected/

## Example log

```text
[14:05:12] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Configuration file ./world/serverconfig/waystones-server.toml is not correct. Correcting
[14:05:12] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key general.warpStoneCooldown was corrected from -15 to its default, 30.
[14:05:12] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key general.allowInterdimensional was corrected from null to its default, true.
```

## Log lines this page covers

- `Configuration file <path> is not correct. Correcting`
- `Incorrect key <key> was corrected from <old value> to <new value>`

## What it means

Each Forge or NeoForge mod describes its configuration: which keys exist, what kind of value each takes and which values are allowed. When the loader reads a file that does not match that description, it does not stop the server. It prints `Configuration file ... is not correct. Correcting`, then one line per key it set, with the old value and the new one, and saves the file.

The diagnosis counts this as one warning per run, with one occurrence per file corrected, and shows the first file with its keys.

## Why it happens

- **New keys after a mod update.** The new version added settings the old file does not have; they show as `corrected from null`. This is normal and harmless: the new settings get their defaults.
- **A first start.** Forge's own `fml.toml` and some mods' files are written with only part of their keys at first and filled in on the next read.
- **A value outside the allowed range or of the wrong kind,** for example a negative cooldown or text where a number belongs. The loader replaces your value with the default, so a setting you chose is lost.
- **A file from another version** of the mod, where keys were renamed or moved.

## How to fix

1. Read the `Incorrect key` lines. Keys `corrected from null` were missing and need nothing from you.
2. For a key corrected from a value you set, that setting is now back to its default. Look up the allowed values in the comments of the file (the mod writes them above each key) and set the key again with a valid value.
3. If the same file is corrected at every start, a value keeps being refused, or another copy of the file (in `defaultconfigs/` or in a modpack) brings the bad value back each time. Fix that copy.
4. Server files (`<mod>-server.toml`) are in `world/serverconfig/`; common files are in `config/`.

## In Perland

The issue appears in the server's Diagnosis tab with the number of files corrected and the first file's keys; the console names every file. Edit the files in the Files tab. On a server whose mods come from a modpack, fix a file the pack holds in Mod Studio's config editor, since the pack's copy replaces the server's at each start.

## References

- [Forge documentation: configuration](https://docs.minecraftforge.net/en/latest/misc/config/)
- [NeoForge documentation: configuration](https://docs.neoforged.net/docs/misc/config)
