Make the setting file reader more robust