added debug output for reconnect