Thanks a lot! That is indeed the solution.
I've been at this for quite a while trying to get to grips with pointers and casts and streams and such, and sometimes the logical solution eludes
I think I've also figured out how to write a timestamp to the file, but I'm gonna toy a bit with it for now.
Thanks again for the help. If I get stuck again I'll know where to find ya ;-)