Yes, you can use foil. If the top of the meatloaf starts to get dark before it's finished cooking, you can lightly cover the meatloaf with foil to prevent burning.