Exporting log data to a text file