fixed export to output archive for each type
fixed bug in generating csv