Added safety to local build script