csv files are now emitted in the destructor of the device