Added exception handling, including notification of MUC and shutdown after 5 failed attempts in a row.