Add more logging to cpp engine