             
             button.setTitle("Try Next", forState: .Normal)
             let connection = self.stillImageOutput!.connectionWithMediaType(AVMediaTypeVideo)
-            
+            captureSession.startRunning()
             stillImageOutput?.captureStillImageAsynchronouslyFromConnection(connection, completionHandler: { (imageDataSampleBuffer, error) in
                 if error == nil {
                     let imageData = AVCaptureStillImageOutput.jpegStillImageNSDataRepresentation(imageDataSampleBuffer)

                captureSession.removeInput(try AVCaptureDeviceInput(device: backDevice))
                let frontDevice = getDevice(.Front)
                self.captureDevice = frontDevice
                beginSession()
                sender.setTitle("Front", forState: .Normal)
            }catch{
                print("Cant remove/Add input: \(error)")

                button.setTitle("Recording", forState: .Normal)
                
                //let filePath = NSURL(fileURLWithPath: "filePath")
                captureSession.startRunning()
                self.videoFileOutput!.startRecordingToOutputFileURL(filePath, recordingDelegate: self)
            }
            self.recording = !self.recording
