File presence check for an automated workflow
I would recommend decomposing this function into smaller functions. For example, you would end up with something like this:

def check_conformance():
   csv_conformance  = check_csv_conformance()
   disk_conformance = check_disk_conformance()


Then you can return based on these checks as follows:

return csv_conformance &amp;&amp; disk_conformance


Moreover, as a general rule, it is a bad habit to have different amount of return values based on branching. You should have a specific input-output length (again, in general. there are cases where you want a variable length array to be return)