>>Somewhere your resource file is being turned off or changing.
>
>Yeah, I was figuring such..... well, time to go find out what is changing it!
Well, keep the debugger on and have a watch on set("resource",1) and set("resource"). You may check those manually first, before and after running it, to see whether they change (and which does change).