     ///
     public init(_ file: String) {
         internalFile = file
-        let url = NSURL.fileURLWithPath(file, isDirectory: false)
-        audioFile = try! AVAudioFile(forReading: url)
-        let audioFormat = audioFile.processingFormat
-        let audioFrameCount = UInt32(audioFile.length)
-        audioFileBuffer = AVAudioPCMBuffer(PCMFormat: audioFormat,
-                                           frameCapacity: audioFrameCount)
-        try! audioFile.readIntoBuffer(audioFileBuffer)
-        
-        // added for currentTime calculation later on
-        sampleRate = audioFile.fileFormat.sampleRate
-        totalFrameCount = Int64(audioFrameCount)
-        skippedToTime = 0
-        
         internalPlayer = AVAudioPlayerNode()
         super.init()
-        AudioKit.engine.attachNode(internalPlayer)
-        
-        let mixer = AVAudioMixerNode()
-        AudioKit.engine.attachNode(mixer)
-        AudioKit.engine.connect(internalPlayer, to: mixer, format: audioFormat)
-        self.avAudioNode = mixer
-
-        internalPlayer.scheduleBuffer(
-            audioFileBuffer,
-            atTime: nil,
-            options: .Loops,
-            completionHandler: nil)
-        internalPlayer.volume = 1.0
+        let url = NSURL.fileURLWithPath(file, isDirectory: false)
+        do {
+            audioFile = try AVAudioFile(forReading: url)
+        } catch {
+            print("Could not load audio file.")
+            return
+        }
+        if let actualAudioFile = audioFile {
+            let audioFrameCount = UInt32(actualAudioFile.length)
+
+            audioFileBuffer = AVAudioPCMBuffer(PCMFormat: actualAudioFile.processingFormat,
+                                               frameCapacity: audioFrameCount)
+            do {
+                try actualAudioFile.readIntoBuffer(audioFileBuffer!)
+            } catch {
+                print("Could not read data into buffer.")
+                return
+            }
+            
+            // added for currentTime calculation later on
+            sampleRate = actualAudioFile.fileFormat.sampleRate
+            totalFrameCount = Int64(audioFrameCount)
+            
+            AudioKit.engine.attachNode(internalPlayer)
+            
+            let mixer = AVAudioMixerNode()
+            AudioKit.engine.attachNode(mixer)
+            AudioKit.engine.connect(internalPlayer, to: mixer, format: AudioKit.format)
+            self.avAudioNode = mixer
+            
+            internalPlayer.scheduleBuffer(
+                audioFileBuffer!,
+                atTime: nil,
+                options: .Loops,
+                completionHandler: nil)
+            internalPlayer.volume = 1.0
+        }
     }
     
     /// Start playback

    }
    
    /// Replace the current audio file with a new audio file
    public func replaceFile(newFile: String) {
        internalFile = newFile
        reloadFile()

    /// Reload the file from the disk
    public func reloadFile() {
        let url = NSURL.fileURLWithPath(internalFile, isDirectory: false)
        do {
            audioFile = try AVAudioFile(forReading: url)
        } catch {
            print("Could not load audio file.")
            return
        }
        if let actualAudioFile = audioFile {
            let audioFrameCount = UInt32(actualAudioFile.length)

            audioFileBuffer = AVAudioPCMBuffer(PCMFormat: AudioKit.format,
                                               frameCapacity: audioFrameCount)

            do {
                try actualAudioFile.readIntoBuffer(audioFileBuffer!)
            } catch {
                print("Could not read data into buffer.")
                return
            }
            
            // added for currentTime calculation later on
            sampleRate = actualAudioFile.fileFormat.sampleRate
            totalFrameCount = Int64(audioFrameCount)
        }

    }
}
