Updated build script to work with build status