Hi Niels,
The answer to your very simple question is quite complicated, because the very nature of your question is wrong.
We'll cover a lot of this next week in Aarhus, so I think you'll probably know the answer after that in a lot more detail.
In the meantime tell us more about what exactly you're trying to do and we can point you in the right direction. the files are opened and closed many times during the life of the form, on different threads, so you need to be a lot more specific about the "stuff" you are doing, and exactly when you want it done.
cheers
Bruce