Admin Mode Not Fully Working

Here:

void loop() {

...

  File logread = SD.open("log.txt", FILE_WRITE);

Where does this file get closed? It's opened every time through loop. And why open for writing anyway? Surely only open for writing when you are updating the cards.