                 self.viewDelegate.didReceiveProgress(1)
             }
             self.shellCommand("/bin/cp",arg: ["-R",extraDroppedFilePath,"\(lazypath)/"], label: "#COPYEXTRA#", progress: 2)
+            if self.viewDelegate.debugLog {
+                do{
+                    try "========patching done=======".appendLineToURL(NSURL(fileURLWithPath:"\(NSHomeDirectory())/Lazy log.txt"))
+                }catch{}
+            }
             ////////////////////////////ejecting processes////////////////////////progress:9%
             if cdrState {
                 self.shellCommand("/usr/bin/hdiutil",arg: ["detach",lazypath], label: "#EJECTLAZY#", progress: 1)

            self.shellCommand("/bin/rm",arg: ["-rf","\(lazypath)/System/Installation/Packages"], label: "#DELETEPACKAGE#", progress: 2)
            self.privilegedShellCommand("/bin/cp",arg: ["-R","\(esdpath)/Packages","\(lazypath)/System/Installation"], label: "#COPYPACKAGE#",progress: 22)
            self.shellCommand("/bin/mkdir",arg: ["\(lazypath)/System/Library/Kernels"], label: "#Create Kernels folder#", progress: 1)
            /////////////////////////version checking processes////////////////////progress:0%
            let SystemVersionPlistPath = "\(lazypath)/System/Library/CoreServices/SystemVersion.plist"
            let myDict = NSDictionary(contentsOfFile: SystemVersionPlistPath)

            }catch{}
            self.shellCommand("/bin/rm",arg: ["-rf","/tmp/com.pcbeta.lazy"], label: "#CleanDir#", progress: 0)
            self.shellCommand("/bin/mkdir",arg: ["/tmp/com.pcbeta.lazy"], label: "#CleanDir#", progress: 3)
            if self.viewDelegate.debugLog {
                do{
                    try "========cleaning done=======".appendLineToURL(NSURL(fileURLWithPath:"\(NSHomeDirectory())/Lazy log.txt"))
                }catch{}
            }
            ////////////////////////////mounting processes////////////////////////progress:4%
            var esdpath="/tmp/com.pcbeta.lazy/ESDMount"
            if filePath.hasSuffix("dmg") {
