sending table data to a file