Add stop build function