Adds some more debug logging