def METHOD_NAME(outfile, overwrite=None):
    """
    Confirm overwriting a file.
    """
    try:
        if os.path.isfile(outfile):
            if overwrite is None:
                choice = input(f'File "{outfile}" already exist. Overwrite? [y/N]').lower()
                if len(choice) == 0 or choice[0] != 'y':
                    logger.warning(f'File "{outfile}" not overwritten.')
                    return False
            elif overwrite is False:
                return False
    except TypeError:
        pass
    return True