def METHOD_NAME(df,task_name):
    # keep a list of all indexes of files to omit from dataframe
    myindex_to_remove=[]
    # file with omitted inputs that user needs to fix. File is named after the task.
    omitted_inputs="omitted_" + task_name
    fh = open (omitted_inputs,"w")
    # check all input files for whitespaces
    for index, row in df.iterrows():
        res = bool(re.search(r"[\t\s]", row['input_file']))
        if res == True:
            myindex_to_remove.append(index)
            fh.write("Error: file has whitespace: %s\n" % row['input_file'])
    fh.close()
    # return a new df that has bad input files removed.
    return df.drop(index=myindex_to_remove)