diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py
index 904b6f8ce82a27717e05da26f4447a569cedf406..cadd7798d93b94bf4f11c76d18fe8431e61c5d0a 100644
--- a/src/caoscrawler/crawl.py
+++ b/src/caoscrawler/crawl.py
@@ -1184,7 +1184,7 @@ def crawler_main(crawled_directory_path: str,
         _check_record_types(crawled_data)
 
         if provenance_file is not None and debug:
-            crawler.save_debug_data(debug_tree, provenance_file)
+            crawler.save_debug_data(debug_tree=debug_tree, filename=provenance_file)
 
         if identifiables_definition_file is not None:
             ident = CaosDBIdentifiableAdapter()