Updates the notify function to handle subprocess errors gracefully, ensuring better feedback and preventing crashes when notifications fail.