Unsolicited advice: Worry about speed after you get your code working, have profiled it, and determined that the File IO in that particular section of code is a bottleneck.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi