 			if session.canAddInput(audioInput) {
 				session.addInput(audioInput)
 			} else {
-				throw ApertureError.couldNotAddMic
+				throw Error.couldNotAddMic
 			}
 		}
 
 		if session.canAddInput(input) {
 			session.addInput(input)
 		} else {
-			throw ApertureError.couldNotAddScreen
+			throw Error.couldNotAddScreen
 		}
 
 		if session.canAddOutput(output) {
 			session.addOutput(output)
 		} else {
-			throw ApertureError.couldNotAddOutput
+			throw Error.couldNotAddOutput
 		}
 
 		// TODO: Default to HEVC when on 10.13 or newer and encoding is hardware supported. Without hardware encoding I got 3 FPS full screen recording.

		onStart?()
	}

	public func fileOutput(_ captureOutput: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
		shouldPreventSleep = false

		let FINISHED_RECORDING_ERROR_CODE = -11_806

		audioDevice: AVCaptureDevice? = .default(for: .audio),
		videoCodec: String? = nil
	) throws {
		let input = try AVCaptureScreenInput(displayID: screenId).unwrapOrThrow(Error.invalidScreen)

		input.minFrameDuration = CMTime(videoFramesPerSecond: framesPerSecond)

