Added outputting tabular data to text file.