Improve message in case of build failure.
Use explicit return instead of err_exit.

err_exit shell option is not reliable when inside shell function.
It is better to use explicit return statements.
Leave it to the user to provide working boost.