Removed errexit to no longer exit the script when the first command exits
Setting errexit caused the scripts to exit when the first command gives a non-zero error code. This stops that so the directories can be renamed after failure and then it throws the same error code.