Add logging to debug