added debug messages to investigate #317