configured debug logging, added some logging