better error reporting and spanning tree communication

I used these changes to investigate the hadoop issue I reported.