 
     // The node we record from
     private var node: AKNode?
+    
     // The file to record to
-    private var tape: AKAudioFile
+    private var internalAudioFile: AKAudioFile
 
     // the size of the recording buffer
     // Not tested, default is 1024

        if  node != nil {
            recording = true
            print ("recording")
            node!.avAudioNode.installTapOnBus(0, bufferSize: bufferSize, format: tape.processingFormat, block: { (buffer: AVAudioPCMBuffer!, time: AVAudioTime!) -> Void in
                do {
                    try self.tape.writeFromBuffer(buffer)
                    print("writing ( file duration:  \(self.tape.duration) seconds)")
                } catch let error as NSError {
                    print("Write failed: error -> \(error.localizedDescription)")
                }

        if file == nil {
            // We create a record file in temp directory
            do {
                self.internalAudioFile = try AKAudioFile()
            } catch let error as NSError {
                print ("AKNodeRecorder Error: Cannot create an empty audio file")
                throw error
            }

        } else {

            do {
                // We initialize AKAudioFile for writing (and check that we can write to)
                self.internalAudioFile = try AKAudioFile(writeAVAudioFile: file!)
            } catch let error as NSError {
                print ("AKNodeRecorder Error: cannot write to \(file!.fileNamePlusExtension)")
                throw error
