                 print("removing \(path)")
                 do {
                     try fileManager.removeItem(atPath: path)
-                    listRecordings()
                     settingTable.reloadData()
                 } catch let error as NSError {
                     NSLog("could not remove \(path)")

        alert.addAction(UIAlertAction(title: "Keep", style: .default, handler: {action in
            print("keep was tapped")
            self.listRecordings()
            self.recorder = nil
        }))
        alert.addAction(UIAlertAction(title: "Delete", style: .default, handler: {action in

    // MARK: - Recording part
    
    func onRemoveAll(_ sender: AnyObject) {
        recorderCell?.recordBtn.setTitle("Record", for: .normal)
        deleteAllRecordings()
        listRecordings()
        settingTable.reloadSections([1], with: .automatic)
    }
    
    func onStop(_ sender: UIButton) {
        print("stop")
        willBeRecording = false
        
        recorder?.stop()
        player?.stop()
        meterTimer.invalidate()
        
        recorderCell?.recordBtn.setTitle("Record", for: .normal)
        let session = AVAudioSession.sharedInstance()
        do {
            try session.setActive(false)
        } catch let error as NSError {
            print("could not make session inactive")
            print(error.localizedDescription)
