check returncode in build script