Open gas tank opening, or partially filled opening is dangerous for many reasons. Driving down the road, rock flipped up, hit side of car, spark, flame. Make a sharp right, splash gas down quarter, Neighboring car flicks a cigarette out at stop light in heat, spark-flame the fumes, etc.
A rag or foil is better than nothing, but adds danger to when you are out.