Adding more debug logging