Simulate and write to CSV