added some debugging outputs;