Correct a few coding mistakes in error message reporting, and when reading a previous MapCategory file