It looks like some of the variables were incorrectly named. I also quieted down the grep command. Not sure about redirecting ssh-add to /dev/null though. It would prevent any actual errors from being shown.