updated logs
diff --git a/tasks/download_files.yml b/tasks/download_files.yml
index 8dc505d..733d80d 100644
--- a/tasks/download_files.yml
+++ b/tasks/download_files.yml
@@ -9,5 +9,5 @@
   with_items: "{{ result.files }}"
   loop_control:
     loop_var: file
-  when: result.matched > 0 and result.files | length > 0
+  when: result.matched > 0 and result.files is defined and result.files | length > 0