Fix code scanning alert - Potentially uninitialized local variable
there is no assignment to `s` and `log_s` when `else:` is triggered.

<!-- Warning: The suggested title contains the alert rule name. This can expose security information. -->

Tracking issue for:
- [x] https://github.com/NVIDIA/NeMo/security/code-scanning/772
