save session to file everytime finish is clicked
trying to figure out how to write to a file/ refactored some code