@@ -146,8 +146,6 @@ public static void unlinkSelf() {
     }
 
     public static void main(String... args) {
-        unlinkSelf();
-
         try {
             // Wait for the server to die
             System.in.read();
@@ -187,5 +185,7 @@ public static void main(String... args) {
                 Device.setScreenPowerMode(Device.POWER_MODE_NORMAL);
             }
         }
+
+        unlinkSelf();
     }
 }