Further checks added for configuration file reading, this should now cover all possible errors