added some debug outputs