'Exports a list of fuzzable requests to the user configured file.'

def flush(self):

    fuzzable_request_set = kb.kb.get_all_known_fuzzable_requests()
    filename = os.path.expanduser(self.output_file)
    try:
        out_file = open(filename, 'w')
    except IOError as ioe:
        msg = 'Failed    to    open    the    output    file    for    writing:    "%s"'
        om.out.error((msg % ioe))
        return
    try:
        for fr in fuzzable_request_set:
            out_file.write((fr.to_base64() + '\n'))
    except Exception as e:
        msg = ('An    exception    was    raised    while    trying    to    export    fuzzable    requests    to    the    output    file:    "%s".' % e)
        om.out.error(msg)
    finally:
        out_file.close()
