Just updated 4.0.7. Now, if the licensemanager is unreachable, the script won't run. In addition, the error is logged so we'll have a clue about the cause.
Thanks for your help in troubleshooting this. Hopefully the remainder of your study will go more smoothly, but let us know if you continue to encounter this issue.