added some logging messages for better debugging #266