Make config file reader more defensive