Added CSV Output

As well as logging to file.