Adds more debug logging