def check_file(file, key_words, black_list):
    """
    Check the file against a black list as well as check if it has keywords in
    it.

    Parameters
    ----------
    file : string
        filename to check
    key_words : list
        list of strings required to be in file name
    black_list : list
        list of files that are black listed, that file can't be called
    Returns
    --------
    all_files_pass : bool
        Returns True if file is not in black_list and contains all key_words
    """
    #check if ile in black list
    if file in black_list:
        return False
    else:
        #check if keyword not in file
        for k in key_words:
            if k not in file:
                return False
        #return true if passes through
        return True