Added an option for writing points to a text file. Handy for use in other purposes.