added bridgeErrorHandler
polished