<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert_file(filename, renderer):
 """ Parse a Markdown file and dump the output to stdout. """

    try:
        with open(filename, 'r') as fin:
            rendered = mistletoe.markdown(fin, renderer)
            print(rendered, end='')
    except OSError:
        sys.exit('Cannot open file "{}".'.format(filename))