You're welcome. I dunno - that's weird. BTW - you could still use that pseudo code you just have to delete the log file if it exists - and remember to close it at the end of your code (which means if it does crash you may not see it.... (again missing append command)
Back to your problem. For testing purposes - Try tossing in a file xist check - and/or full path ... and try opening a file that DOESN'T exist and perhaps one that is open with another program - additionally I'd check to see what the flags are on that file - perhaps an attribute is set (read/only, system file, etc) that is making it act weird like that.
I've run into a ton of caveats in this language ... especially debugging - gives wrong line numbers when you have multiple source code files and often error messages do not tell you anything. I've gotton message similiar to Error in DOFuntion::CallInternal
What does that mean? It meant I had an accidental char after a function name: MyFunction()oops
I changed it to MyFunction() all was fine - simple error... YUP - Error message gives ya a hint? NOPE.
hehe - good luck
-=/Jaze/=-