add callback function into completed plugin