             attributes["customArchiveName"] = customArchiveName
             attributes["revealArchiveInOrganizer"] = revealArchiveInOrganizer.xmlString
             let element = AEXMLElement(name: "ArchiveAction", value: nil, attributes: attributes)
-            super.addPreActionsPostActions(element)
+            super.writeXML(parent: element)
             return element
         }
     }

            self.postActions = try element["PostActions"]["ExecutionAction"].all?.map(ExecutionAction.init) ?? []
        }

        fileprivate func addPreActionsPostActions(_ element: AEXMLElement) {
            if !self.preActions.isEmpty {
                let preActions = element.addChild(name: "PreActions")
                self.preActions.forEach { (preAction) in

                                        "useCustomWorkingDirectory": useCustomWorkingDirectory.xmlString,
                                        "debugDocumentVersioning": debugDocumentVersioning.xmlString
                ])
            super.writeXML(parent: element)
            if ignoresPersistentStateOnLaunch {
                element.attributes["ignoresPersistentStateOnLaunch"] = ignoresPersistentStateOnLaunch.xmlString
            }
