Use a thread to (hopefully) gracefully abort recording