Fixed save opt file as csv bug

Contained reference to fileList for name of file, replaced with
reference to tree.