added logic to check for broker success and fail and to exit properly on failure
removed uneeded cmd line parameter