def writeSamples(outfile1, outfile2, ncats, catsize, weird, weirdsize):
    """writes two files, differing only on the value of one category"""
    try:
        f = open(outfile1, 'w')
    except IOError:
        print('For some reason I cannot open ' + outfile1)
        print('Check directory permissions and/or file name')
        exit(-1)
    try:
        g = open(outfile2, 'w')
    except:
        print('For some reason I cannot open ' + outfile1)
        print('Check directory permissions and/or file name.')
        exit(-1)
    for i in range(ncats):
        f.write('cat_' + str(i) + '\t' + str(catsize) + '\n')
        g.write('cat_' + str(i) + '\t' + str(catsize) + '\n')
    f.write(weird + '\t0\n')
    g.write(weird + '\t' + str(weirdsize) + '\n')
    f.close()
    g.close()
