         
         task.execute(withAppleEvent: event) { (result: NSAppleEventDescriptor?, error: Error?) in
             if let error = error {
-                Script.writeToConsole(message: error.localizedDescription, scriptName: scriptName)
-            }
-        }
-    }
-    
-}
-
-
-
-final class ShellScript: Script {
+                AbstractScript.writeToConsole(message: error.localizedDescription, scriptName: scriptName)
+            }
+        }
+    }
+    
+}
+
+
+
+final class ShellScript: AbstractScript {
     
     static let extensions = ["sh", "pl", "php", "rb", "py", "js"]
     

            do {
                input = try self.readInputString(type: inputType, editor: document)
            } catch let error {
                Script.writeToConsole(message: error.localizedDescription, scriptName: self.name)
                return
            }
        } else {

            // put error message on the sconsole
            let errorData = errPipe.fileHandleForReading.readDataToEndOfFile()
            if let message = String(data: errorData, encoding: .utf8), !message.isEmpty {
                AbstractScript.writeToConsole(message: message, scriptName: scriptName)
            }
        }
    }
