   fileprivate func addStillImageOutput() throws {
     stillImageOutput = AVCaptureStillImageOutput()
     stillImageOutput?.outputSettings = [AVVideoCodecKey: AVVideoCodecJPEG]
-    
-    if (!captureSession.canAddOutput(stillImageOutput)) {
-      throw CaptureManagerError.invalidCaptureOutput
-    }
-    
-    captureSession.addOutput(stillImageOutput)
+    try addCaptureOutput(stillImageOutput!)
   }
   
   /**

   */
  fileprivate func addVideoInput() throws {
    videoInput = try AVCaptureDeviceInput(device: videoDevice)
    
    if (!captureSession.canAddInput(videoInput)) {
      throw CaptureManagerError.invalidCaptureInput
    }
    
    captureSession.addInput(videoInput)
  }
  
  /**

  case sessionNotSetUp
  case missingOutputConnection
  case missingVideoDevice
  case missingMovieOutput
  case missingPreviewLayerProvider
  case cameraToggleFailed
  case focusNotSupported
