application.js, record.js: reset all the record variables and delete the empty file if the recording pipeline returns a failure state