diff --git a/apps/cli/executables/pexable/casa_envoy/casa_envoy/foundation.py b/apps/cli/executables/pexable/casa_envoy/casa_envoy/foundation.py
index 508a8570d3566a662c36ff9fb2d9e981ea9fc65c..2a3e0a92439e799e6306ac435e1ea086cb3ccde5 100644
--- a/apps/cli/executables/pexable/casa_envoy/casa_envoy/foundation.py
+++ b/apps/cli/executables/pexable/casa_envoy/casa_envoy/foundation.py
@@ -89,7 +89,7 @@ class GeneralFoundation(FoundationIF):
         """
         # Copy files that need to exist next to the data into the rawdata directory
         for file in Path(self.working_dir).glob('*flagtargetstemplate.txt'):
-            if file.exists():
+            if Path(file).exists():
                 shutil.copy(file, self.rawdata_dir)