save output plot to PDF
save raw output to csv file so that it can be appended to for iterations