Adjustments on CSV generation and cleanup

same here