Pass callback to precompile function instead