Did some troubleshooting and the problem seems to be when looking for the string "$", it is not there in the response, but the module log file says it is -
spawn id(6): Does ` '^M
match:^M
pattern #1: -re `$'? YES!!^M
Before match string: ` '^M
Match string: `'^M
After match string: `'^M
Matchlist: ()^M
Dec 03 18:09:57 Increasing my step to 5
Dec 03 18:09:57 Value of step is 5