Logging timestamped sensor data to CSV