There are a number of precautions you should take when purchasing and using prepared foods. First of all only buy food from a dealer who regularly rotates their stock and who buys direct from the manufacturer or from a wholesaler who rotates their stock. Most flake foods have a shelf live of about 6 months if not refrigerated. Secondly, as soon as you open your food make sure you do not leave it close to the tank or in other warm, humid areas. Keep the container tightly sealed and in the frige.
Some hobbyists soak their foods in vitamin supplements before feeding.
This is a good idea only if the vitamins are fresh of course. Baby vitamins have been used with some success and have the added benefit of having expiry dates on the jars. Of course the best foods are those that are as fresh as possible such as raw shrimp, clams, mussels and marine fish. For large predators such as groupers and lionfish, it is extremely important to avoid feeding them freshwater fish as a staple food. Try and wean them from these foods and onto prepared marine foods or fresh shrimp etc.