If you are worried that the texture of your food will change when covered with foil or that it'll get overcooked, you can use parchment paper instead or in addition to the foil.