added methods write_genotype_matrix, incrementcellcount, boolean parameter for log files in the init function