Minor bug fix

fixed error with recording multiple files; cleared the file stream
between recordings