Updated logging bug in StochRSI

Updated logging function, and scoping of variables to remove errors.