added saving of parameters during recording