Add callback to build function