added more debug outputs