[MAESTRO-3865] [MAESTRO-3869] better function call checks (i.e. not broken ones), wait for activemq to come up fully before trying to connect.  print more errors when things go wrong