Added OS check in notification function