First off, I assume $file is a COM reference and not any intrinsic KiX function, therefore you should state that. A little snippet of code wouldn't hurt too.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.