added debug messages to investigate #379