Directory closed

At the of the main routine, the routine stops while the directory handle DIR
is still opened.

Now, DIR is closed on line 61.

Yes, I know: it didn't matter since the program terminates there and closes
all open handles anyway.