diff --git a/BaseLib/FileTools.cpp b/BaseLib/FileTools.cpp
index 6f32612f4637da5d36a029199b13ae1351dba63f..f8f541a048b37ff6aec39ea9e340d2a6068a5996 100644
--- a/BaseLib/FileTools.cpp
+++ b/BaseLib/FileTools.cpp
@@ -119,21 +119,11 @@ void removeFiles(std::vector<std::string> const& files)
 {
     for (auto const& file : files)
     {
-        int const success = std::remove(file.c_str());
-        if (success == 0)
+        bool const success = fs::remove(fs::path(file));
+        if (success)
         {
             DBUG("Removed '{:s}'", file);
         }
-        else
-        {
-            if (errno == ENOENT)  // File does not exists
-            {
-                continue;
-            }
-            ERR("Removing file '{:s}' failed with error {:d}.", file, errno);
-            std::perror("Error: ");
-            OGS_FATAL("Unrecoverable error happened while removing a file.");
-        }
     }
 }
 } // end namespace BaseLib