fixed printing into files to 10 per row