Add some error handling when reading from config file