Made build script return -1 on unsuccessful builds