Not sure, but some of the KiX functions fall down if the file is in use. Try the 4.51 beta release which tries to address at least some of the issues. If you are sure that you coded it right and that the 4.51 beta does not work, post your issue to the beta section.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.