added more debug logs