pub fn stop_recording()
Stop recording earlier.
Note that by default recording stops on_process_exit.
on_process_exit