Perche' aprire e chiudere il file?

Lo apri una volta, ci scrivi tutto quello che ci devi scrivere, e lo chiudi alla fine.