in reply to appending data to a file
Just slightly unmodify your code to get it working again ;^P
If you use code tags (<c>code</c>) to format your code it would be easier to help.
...roboticus