def write_subuid_file(filename, subuids, mode='w'):
    """Writes out the given list of subuids to the filename"""
    with open(filename, mode) as f:
        for subuid in subuids:
            f.write('%s\n' % subuid)
