spoilage detection