Write out mouse state data as CSV file