You might try pasting your actual code and a little more detail of you actions/intents. This will help others to come up with more accurate responses. The path may seem right to you, but without seeing it, how can we be sure? Maybe you have a syntax error you were unaware of.
In the following example, the contents of readme.txt are printed to readme2.txt. The file_open function opens readme.txt in read only mode and readme2.txt in write only mode. (This example is provided by TSL Online Reference)
The only time I have really seen that error is when you create a function (either compiled or inscript) named the same as a WinRunner base function - and you unload it from memory (either through unload() of compiled module or hitting the Stop button)
Strange it is just happening if those conditions were not met.
Insanity: doing the same thing over and over again and expecting different results