writing 1000 recordcs on three separate files