Changed checkBuild to throw rather then to exit.