add defensive code at custom extend code area