diff --git a/common/cpp/src/system_io/system_io.cpp b/common/cpp/src/system_io/system_io.cpp
index b49387696235017e18deab870e99c7ab6b6b1089..e162e2317190e8a5f5a3dd9d631e55a6513257ee 100644
--- a/common/cpp/src/system_io/system_io.cpp
+++ b/common/cpp/src/system_io/system_io.cpp
@@ -164,11 +164,13 @@ Error SystemIO::WriteDataToFile(const std::string& root_folder, const std::strin
     }
 
     if (err) {
+        err->Append(full_name);
         return err;
     }
 
     Write(fd, data, length, &err);
     if (err) {
+        err->Append(full_name);
         return err;
     }
 
@@ -592,6 +594,7 @@ Error SystemIO::CreateDirectoryWithParents(const std::string& root_path, const s
         Error err;
         CreateNewDirectory(new_path, &err);
         if (err && err != IOErrorTemplates::kFileAlreadyExists) {
+            err->Append(new_path);
             return err;
         }
         if (iter != path.end()) {