Added debug outputs.