diff --git a/Applications/Utils/MeshEdit/moveMeshNodes.cpp b/Applications/Utils/MeshEdit/moveMeshNodes.cpp
index 5eedb9ad389b8acbb261139191d35bc88c8f9920..5c8224b2693a0b179b6a01d3acdd0fa9d7ae41d2 100644
--- a/Applications/Utils/MeshEdit/moveMeshNodes.cpp
+++ b/Applications/Utils/MeshEdit/moveMeshNodes.cpp
@@ -14,6 +14,8 @@
 
 #include "Applications/ApplicationsLib/LogogSetup.h"
 
+#include "BaseLib/FileTools.h"
+
 #include "GeoLib/AABB.h"
 
 #include "MeshLib/IO/readMeshFromFile.h"
@@ -72,7 +74,6 @@ int main (int argc, char* argv[])
         INFO("Usage: %s <msh-file.msh> <keyword> [<value1>] [<value2>]",
              argv[0]);
         INFO("Available keywords:");
-        //for (std::size_t i=0; i<keywords.size(); i++)
         INFO(
             "\t-ALL <value1> <value2> : changes the elevation of all mesh "
             "nodes by <value2> in direction <value1> [x,y,z].");
@@ -82,19 +83,17 @@ int main (int argc, char* argv[])
         INFO(
             "\t-LOWPASS : applies a lowpass filter over node elevation using "
             "directly connected nodes.");
-        return -1;
+        return EXIT_FAILURE;
     }
 
     const std::string msh_name(argv[1]);
     const std::string current_key(argv[2]);
-    //const std::string msh_name("D:\\rappbode-2013-03-03--30m_lowpass_new_new.msh");
-    //const std::string current_key("-MESH");
-
-    if (msh_name.substr(msh_name.length()-4, 4).compare(".msh") != 0)
+    std::string const ext (BaseLib::getFileExtension(msh_name));
+    if (!(ext == "msh" || ext == "vtu"))
     {
-        ERR("Error: Parameter 1 should be a msh-file.");
+        ERR("Error: Parameter 1 must be a mesh-file (*.msh / *.vtu).");
         INFO("Usage: %s <msh-file.gml> <keyword> <value>", argv[0]);
-        return -1;
+        return EXIT_FAILURE;
     }
 
     bool is_keyword(false);
@@ -110,12 +109,15 @@ int main (int argc, char* argv[])
         ERR("Keyword not recognised. Available keywords:");
         for (auto const& keyword : keywords)
             INFO("\t%s", keyword.c_str());
-        return -1;
+        return EXIT_FAILURE;
     }
 
-    std::unique_ptr<MeshLib::Mesh> mesh(
-        MeshLib::IO::readMeshFromFile(msh_name));
-    //std::vector<std::size_t> del_nodes;
+    std::unique_ptr<MeshLib::Mesh> mesh (MeshLib::IO::readMeshFromFile(msh_name));
+    if (mesh == nullptr)
+    {
+        ERR ("Error reading mesh file.");
+        return 1;
+    }
 
     // Start keyword-specific selection of nodes
 
@@ -125,7 +127,7 @@ int main (int argc, char* argv[])
         if (argc < 5)
         {
             ERR("Missing parameter...");
-            return -1;
+            return EXIT_FAILURE;
         }
         const std::string dir(argv[3]);
         unsigned idx = (dir.compare("x") == 0) ? 0 : (dir.compare("y") == 0) ? 1 : 2;
@@ -147,14 +149,18 @@ int main (int argc, char* argv[])
         if (argc < 5)
         {
             ERR("Missing parameter...");
-            return -1;
+            return EXIT_FAILURE;
         }
         const std::string value (argv[3]);
         double max_dist(pow(strtod(argv[4],0), 2));
-        //const std::string value("D:\\Rappbodevorsperre_elevation440m.msh");
-        //double max_dist (25.0);    // squared maximum distance at which reference points are used
         double offset (0.0); // additional offset for elevation (should be 0)
-        MeshLib::Mesh* ground_truth (MeshLib::IO::readMeshFromFile(value));
+        std::unique_ptr<MeshLib::Mesh> ground_truth (MeshLib::IO::readMeshFromFile(value));
+        if (ground_truth == nullptr)
+        {
+            ERR ("Error reading mesh file.");
+            return EXIT_FAILURE;
+        }
+
         const std::vector<MeshLib::Node*>& ground_truth_nodes (ground_truth->getNodes());
         GeoLib::AABB bounding_box(ground_truth_nodes.begin(), ground_truth_nodes.end());
         MathLib::Point3d const& min(bounding_box.getMinPoint());
@@ -201,8 +207,10 @@ int main (int argc, char* argv[])
     }
     /**** add other keywords here ****/
 
-    MeshLib::IO::writeMeshToFile(
-        *mesh, msh_name.substr(0, msh_name.length() - 4) + "_new.msh");
-    return 1;
+    std::string const new_mesh_name (msh_name.substr(0, msh_name.length() - 4) + "_new.vtu");
+    if (MeshLib::IO::writeMeshToFile(*mesh, new_mesh_name) != 0)
+        return EXIT_FAILURE;
 
+    INFO ("Result successfully written.")
+    return EXIT_SUCCESS;
 }
diff --git a/MeshLib/IO/writeMeshToFile.cpp b/MeshLib/IO/writeMeshToFile.cpp
index df6d557b25d8c31d59bdf7141c523096b84d9eb9..0f073aa0e4b58411a1d68538898ed30c1cbbce61 100644
--- a/MeshLib/IO/writeMeshToFile.cpp
+++ b/MeshLib/IO/writeMeshToFile.cpp
@@ -22,19 +22,22 @@ namespace MeshLib
 {
 namespace IO
 {
-void writeMeshToFile(const MeshLib::Mesh &mesh, const std::string &file_name)
+int writeMeshToFile(const MeshLib::Mesh &mesh, const std::string &file_name)
 {
     if (BaseLib::hasFileExtension("msh", file_name))
     {
         MeshLib::IO::Legacy::MeshIO meshIO;
         meshIO.setMesh(&mesh);
         meshIO.writeToFile(file_name);
+        return 0;
     } else if (BaseLib::hasFileExtension("vtu", file_name)) {
         MeshLib::IO::VtuInterface writer(&mesh);
         writer.writeToFile(file_name);
-    } else {
-        ERR("writeMeshToFile(): Unknown mesh file format in file %s.", file_name.c_str());
+        return 0;
     }
+
+    ERR("writeMeshToFile(): Unknown mesh file format in file %s.", file_name.c_str());
+    return -1;
 }
 
 } // end namespace IO
diff --git a/MeshLib/IO/writeMeshToFile.h b/MeshLib/IO/writeMeshToFile.h
index ae58ed033c3dcf7dbfe522af9698f12048d0f36b..6bd0b8476dc87c64f518d53454c3721f45954f1a 100644
--- a/MeshLib/IO/writeMeshToFile.h
+++ b/MeshLib/IO/writeMeshToFile.h
@@ -16,7 +16,7 @@ namespace MeshLib
 class Mesh;
 namespace IO
 {
-void writeMeshToFile(const MeshLib::Mesh &mesh, const std::string &file_name);
+int writeMeshToFile(const MeshLib::Mesh &mesh, const std::string &file_name);
 }
 }