**TEST 1:**
1. Create a custom XML highlighting file, which we will call "TestMode".
2. Open any file, for example `$HOME/test.c`.
3. Apply the mode "TestMode". Now, when the file is opened, the "TestMode" mode will be used by default.
4. Close Kate and delete the custom XML file of "TestMode" or rename the definition name.
5. Reopen `test.c`. Now the "TestMode" mode is invalid:
**Before:** The "Normal" mode was used and an empty string was displayed as the mode name in the status bar.
**Now:** The default mode, defined by the file extension or MIME-type, is used.
**TEST 2:**
1. Open any file, for example `$HOME/test.c`.
2. Open `$HOME/.config/katemetainfos`, search for the previous file and modify the value of **Mode=**, by entering an invalid or empty one.
3. Reopen `test.c`