Added functionality to BadConfigFileException.
It should write error messages to a file.