Fix a few typos
Add -o option which logs statistics in CSV format
Clean up CSV output
Fix CSV output for attach mode