Adjusted output csv

Adjusted and trimmed output csv so single file is written