diff --git a/src/server_side_scripting/ext_file_download/zip_files.py b/src/server_side_scripting/ext_file_download/zip_files.py
index 6969af6b84049ec89e9790c0cfc9c52c872f7103..7f151d8bf28d89d3193d44665ae7a1645828255c 100755
--- a/src/server_side_scripting/ext_file_download/zip_files.py
+++ b/src/server_side_scripting/ext_file_download/zip_files.py
@@ -71,9 +71,7 @@ def collect_files_in_zip(ids, table):
         # download and add all files
         for file_id in ids:
             try:
-                tmp = db.execute_query("FIND FILE WITH ID={a:}".format(
-                    a=file_id),
-                    unique=True)
+                tmp = db.get_entity_by_id(file_id, role="FILE")
             except EntityDoesNotExistError as e:
                 # TODO
                 # Current behavior: script terminates with error if just one
@@ -82,7 +80,7 @@ def collect_files_in_zip(ids, table):
                 # ids, but the user should be informed about the missing files.
                 # How should we do this?
                 logger = logging.getLogger("caosadvancedtools")
-                logger.error("Did not find Entity with ID={}.".format(
+                logger.error("Did not find File with ID={}.".format(
                     file_id))
 
                 raise e