I still don't understand what exactly the problem was :o). But if you have troubles with currentDir, then you may have to try this at the beginning of your program:
ChangeDir SystemProperty$("appdir")
This is also required in screensavers etc., basicly whenever windows is confused about where it is ^^
ChangeDir SystemProperty$("appdir")
This is also required in screensavers etc., basicly whenever windows is confused about where it is ^^