Better error handling in pb_base/cfg_app.py