     vmController.run {
       withArgs : "kdc #{app.path}"
       vmName   : app.vm
-    }, (err, response)=>
-
-      unless err
+    }, (err, response)->
+
+      if err
+
+        loader.notificationSetTitle "An unknown error occured"
+        loader.notificationSetTimer 2000
+        callback? err
+        warn err
+
+      else if response.exitStatus is 0
 
         loader.notificationSetTitle "App compiled successfully"
         loader.notificationSetTimer 2000


        loader.destroy()

        if err.message is "exit status 127"
          KodingAppsController.installKDC()
          callback? err
          return

        new KDModalView

          width    : 600
          overlay  : yes
          cssClass : 'compiler-modal'
          content  : "<pre>#{err}</pre>"

        callback? { message: "Failed to compile: #{err}" }

  @createJApp = (path, callback)->

