Limited number of issues.
Fixed file open option to truncate.
Extracted  unmarshaling method.
Extracted creating CSV writer method.
Enabled stdout.