CG-2786: Made callback function public so can be used as an output_buffer
CG-2786: Updated the version