Remove has_file and simplify return logic.