updated to catch exception when sending notifications