Background.
I am writing some VBA for iGrafx which iterates a directory hierarchy, opens diagrams, does something with them, then closes them. This process can take several hours to run. The VBA is flakey and crashes out frequently.

EDIT: Not my code thats flakey, but the Object Model exposed by the Application.

Question.
What is best way to log current position so I can restart where I left off, rather than having to start at the beginning?

I currently write my position to a log file, then check for its existence. If the file exists I read the number from it and know where to re-start. Is this the way to go, or is there something better?