catch exception when trying to run bw outside a repo