Remove fopen() and fclose() from uptodate(), use readdir() instead