diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -32,7 +32,9 @@ function buildProblemFilePath() {
 
 function buildOnFinishedHandler(problemFilePath, callback) {
   return function() {
-    fs.unlink(problemFilePath);
+    ['.mzn', '.fzn', '.ozn'].forEach(function(ending) {
+      fs.unlink(problemFilePath.replace('.mzn', ending));
+    });
     callback.apply(null, arguments);
   };
 }
Clean up all temporary files on failure

The solver creates some temporary files that should be deleted after
any execution, including timeouts.