finally fixed, grep -c exits 1 if it prints 0