rolland, the syntax looks ok.
anyway, the line returns allways error, even if the execution was succesfull.

this makes me ask, are you sure the file runs at all?

try adding a line after that errorline with just:
get $key

it hangs the script execution until you press any key.
this way you see does it run and if it does, it will show you the error too.
_________________________
!

download KiXnet