Use pgrep -q instead of redirecting stdout to dev/null