added some logging statements