Starts the recording process.
It writes sensor data to a file at the specified filepath.
If append is true, it appends to the existing file; otherwise, it creates a new file.
Returns the File object for the recorded file.
Throws an exception if recording is already in progress.