The problem here seems to be that the "configure failsafe-account" command requires an interactive prompt. The switch/script is waiting for you to enter the user and password and times out. Try a simpler approach to entering that info just by adding it to the next lines after the command:

So the same concept applies to the local admin accounts as well. This script is attempting to read CLI.OUT and respond. That isn't necessary. Just simply enter the responses for the prompted input line by line.