     internal func setupWriter() {
         if let url = self.nextFileURL() {
             do {
-                self.writer = try AVAssetWriter(url: url, fileType: self.fileType())
+                self.writer = try AVAssetWriter(url: url, fileType: self.fileType)
                 if let writer = self.writer {
                     writer.shouldOptimizeForNetworkUse = true
                     writer.metadata = NextLevel.assetWriterMetadata()


extension NextLevelSession {
    
    internal func fileType() -> String {
        return AVFileTypeAppleM4A
    }
    
    internal func fileExtension(fileType: String) -> String {
        return "m4a"
    }
    
    internal func nextFileURL() -> URL? {
        let fileType = self.fileType()
        let fileExtension = self.fileExtension(fileType: fileType)
        let filename = "\(self.identifier)-NL-clip.\(self.sessionClipFilenameCount).\(fileExtension)"
        if let url = NextLevelClip.clipURL(withFilename: filename, directory: self.sessionDirectory) {
            self.removeFile(fileUrl: url)
            self.sessionClipFilenameCount += 1

    
    public var url: URL? {
        get {
            let filename = "\(self.identifier)-NL-merged.\(self.fileExtension)"
            if let url = NextLevelClip.clipURL(withFilename: filename, directory: self.sessionDirectory) {
                return url
            } else {
