         
         let seconds = referenceDate?.timeIntervalSinceNow
         if (seconds != nil) {
-            println("Recorded \(imageCounter) images for a duration of \(-1 * seconds!) seconds, stored in: \(applicationDocumentsDirectory)")
+            println("Recorded: \(imageCounter) frames\nDuration: \(-1 * seconds!) seconds\nStored in: \(outputPathString())")
         }
     }
     

    var view : UIView?
    var outputPath : NSString?
    var referenceDate : NSDate?
    var outputJPG = false
    
    func start() {
        

        }
    }
    
    func outputPathString() -> String {
        if (outputPath != nil) {
            return outputPath!
        }
        else {
            return applicationDocumentsDirectory.absoluteString!
        }
    }
    
    func createImageFromView(captureView : UIView) {
        UIGraphicsBeginImageContextWithOptions(captureView.bounds.size, false, 0)
        captureView.drawViewHierarchyInRect(captureView.bounds, afterScreenUpdates: false)
        
        let image = UIGraphicsGetImageFromCurrentImageContext();
        
        var fileExtension = "png"
        var data : NSData?
        if (outputJPG) {
            data = UIImageJPEGRepresentation(image, 1)
            fileExtension = "jpg"
        }
        else {
            data = UIImagePNGRepresentation(image)
        }
        
        imageCounter = imageCounter + 1
        var path = outputPathString()
        path = path.stringByAppendingPathComponent("/image\(imageCounter).\(fileExtension)")
        
        data!.writeToURL(NSURL(string: path)!, atomically: false)
        
        UIGraphicsEndImageContext();
    }
