Added periodic saving of quarry data