 
     private let previousAVAudioSessionCategory: String?
 
-    public init(node: AKNode = AudioKit.output!, file: AKAudioFile? = nil, buffer bufferSize: UInt32 = 1024  ) throws {
+    /// Initialize the node recorder
+    ///
+    /// - parameter node:       Node to record from
+    /// - parameter file:       Audio file to record to
+    /// - parameter bufferSize: Size of the buffer to use
+    ///
+    public init(node: AKNode = AudioKit.output!,
+                file: AKAudioFile? = nil,
+                buffer bufferSize: UInt32 = 1024  ) throws {
 
 
         // requestRecordPermission...


    // The node we record from
    private var node: AKNode?
    // The file to record to
    private var tape: AKAudioFile

    // the size of the recording buffer
    // Not tested, default is 1024

    /// Reset the AKAudioFile to clear previous recordings
    public func reset() throws {

        // Delete the current file audio file
        let fileManager = NSFileManager.defaultManager()
        let url = internalAudioFile.url
        let settings = internalAudioFile.processingFormat.settings

        do {
            try fileManager.removeItemAtPath(internalAudioFile.url.absoluteString)
        } catch let error as NSError {
            print ("AKNodeRecorder Error: cannot delete Recording file:  \(internalAudioFile.fileNamePlusExtension)")
            throw error
        }

        // Creates a blank new file
        do {
            internalAudioFile = try AKAudioFile(forWriting: url, settings: settings)
            print ("AKNodeRecorder: file has been cleared")
        } catch let error as NSError {
            print ("AKNodeRecorder Error: cannot record to file: \(internalAudioFile.fileNamePlusExtension)")
            throw error
        }
    }

    // MARK: - public vars
    
    /// True if we are recording.
    public var isRecording: Bool {
        return recording
    }

    // Duration of recording
    public var recordedDuration: Double {
        return internalAudioFile.duration
    }

    /// return the AKAudioFile for reading
    public var audioFile: AKAudioFile? {

        var internalAudioFileForReading: AKAudioFile
        do {
            internalAudioFileForReading = try AKAudioFile(readAVAudioFile: internalAudioFile)
            return internalAudioFileForReading
        } catch let error as NSError {
            print ("Cannot create internal audio file for reading")
            print ("Error: \(error.localizedDescription)")
            return nil
        }
