Refactored bootstrap.sh script

- removed '|| exit 1' pattern by using correct bash options
- safe usage of variables