added code for saving scene points in a text file