Corrected some exception handling when reading config file.