                 }
                 else {
                     dispatch_async(dispatch_get_main_queue(), { () -> Void in
-                        self.showAlertError(error.localizedDescription)
                         self.finalizeSync()
                     })
                 }

        }
    }
    
    func showAlertError(message : String) {
        let alertController = UIAlertController(title: "Error", message: message, preferredStyle: .Alert)
        alertController.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
        
        self.presentViewController(alertController, animated: true, completion: nil)
    }
    
    func finalizeSync() {
        loadImages()
        

                    
                    for photoDictionary in photoArray {
                        var download = true
                        let imageUrl = flickrKit.photoURLForSize(FKPhotoSizeSmall240, fromPhotoDictionary: photoDictionary)
                        
                        // Prevent downloading image from a known url in the database
                        for photo in self.photos {
