Using common sense is a fifth way to tell if food has gone bad. You should consider the type of food, the storage conditions, the preparation methods, and the consumption habits when deciding whether to eat or discard food. To keep food fresh, store it in a clean, dry, and cool place away from direct sunlight, heat, and moisture. Use airtight containers, bags, or wraps to prevent contamination. Refrigerate or freeze perishable foods as soon as possible and thaw them in the refrigerator or microwave. Keep raw and cooked foods separate and wash your hands, utensils, and surfaces before and after handling food. Follow instructions on packages or recipes for cooking, reheating, and serving food. Cook food to the appropriate temperature and time; use a thermometer to check the doneness. Reheat food until it is steaming hot and do not reheat more than once. Serve food within two hours of cooking or reheating; do not leave it at room temperature for longer than that. Refrigerate or freeze leftovers within two hours of serving; eat or discard them within three to four days. Eat food in moderation and variety; do not overstock or hoard what you may not be able to consume before it goes bad. Plan meals and shopping ahead; buy only what you need and can use within a reasonable time. Rotate your stock; use the oldest products first. Donate or compost any edible food that is past its prime but still edible. Knowing how to tell if food has gone bad can help you enjoy your food more, stay healthy, and reduce waste—so when in doubt, throw it out!