Answer:
In the microscopic level you can use non-toxic chemicals etc and you can aslo keep the food in desirable temperature inorder to prevent it from being rotten, incase of some food get contaminated you can just not use it because it can make you sick or if it only partly contaminated, then you can use the uncontaminated part of it and not use the other part.