Add psql result checks before continuing on.