add function to output Cls to individual text file