added logic to check to terminal-notifier