Return with error code if build fails