Add logging to debug helper