The data files are recompiled when you load the game system whenever a change is detected in the raw data files. If no change is detected, no recompile is performed. So the compiled data files will be in the same state when you reload as when you last ran them within Hero Lab.
However, whenever there is an error in the data files during compilation, the data files cannot then be loaded. So Hero Lab goes back to a "safe" state, which ignores all of the user-added content. When you load the data files, you should be seeing an error message that says there was an error loading them and that Hero Lab will retry by ignoring the user-added content. You data is not "lost" - it's simply being ignored so that you can actually load the game system into Hero Lab.
Once you have the game system loaded, you can then get back into the Editor and modify your data file to fix the error. If Hero Lab didn't fall back to a safe state, the error would prevent your from loading the game system, which means you wouldn't be able to access the Editor to fix the error. So that's why it's handled this way.
When you launch the Editor, the last file you were working with is still present and is listed on the File menu. Load it and all your work is right there. Now you need to figure out the error and fix it. If you only modify things in small increments before testing them, you'll always know where the error is. However, if you modify multiple things, the error could be in multiple places, so you'll need to figure out where the error is.
If you aren't sure where the error is because you changed multiple things, you can switch to Plan B. Load the data file you created into a text editor that displays line numbers. All data files are simple text files that conform to the XML standard (it looks a lot like HTML). You can then go to the line number specified within the error message and identify which thing contains the error, as well as what aspect of the thing is incorrect. This should allow you to then return to the Editor, select the broken thing, and make the proper correction.
When you restart Hero Lab with data files that have errors, there's an important detail to remember. Hero Lab has loaded the data files *without* any of your custom content. So *none* of it is currently present. Once you fix the problem, you probably want to have all your content loaded. This is accomplished by using the "Quick Reload" feature within Hero Lab that I described above. The data files are recompiled to incorporate your change(s) and then fully reloaded.
So to sum up:
1. Your data file is still intact and simply contains an error that needs to be fixed.
2. When an error exists, Hero Lab ignores all your user-added content so that it can load the game system and give you access to the Editor to fix the error.
3. Once you fix the error, use Quick Reload to recompile the files and reload the game system with all your custom content included again.
4. Make changes to only one thing at a time until you get comfortable with how everything works - else you'll run the risk of getting confused when errors arise.
5. If you can't figure out where an error is occurring, you can use the line number listed and a text editor to identify where the problem resides.
Hope this helps!!!