def check_file_output(filename, force):
log.debug("<STR_LIT>")<EOL>if os.path.isfile(filename) and not force:<EOL><INDENT>if sys.stdin.isatty():<EOL><INDENT>answer = console.ask("<STR_LIT>",<EOL>filename)<EOL>if answer.lower() != "<STR_LIT:y>":<EOL><INDENT>sys.exit()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>log.error("<STR_LIT>".format(filename))<EOL>sys.exit()<EOL><DEDENT><DEDENT>return FileOutput(filename)<EOL>
Checks if file already exists and ask the user if it should
    be overwritten if it does.