fIxing different number of rows on output files