Hi,
In the future you might want to consider implementing a version control system, so that when the unexpected happens you can compare the files to see what's changed (called diffing) and recover files to earlier states.
The diffing operation in particular would reveal any non manifesting syntax errors you did not know you accidentally created by highlighting the lines purely because they are not the same, which is what your problem sounds like to me and can be quite annoying to track down without such tools.
Gaz