I think it would be good if we can change configuration, and all the changes not to be saved in script as we hit enter, but afterwards we can issue a command write, copy or whatever to save the changes, I think this can be useful, because if we mess up something in configuration just reboot the router and here we go again.
Before making your changes hit CTRL-X in a terminal. Then make changes. If you are satisfied with changes hit CTRL-X again. If the changes disconnect you or you reboot the router the changes will be reverted back to point in time where you entered safe mode.