workaround for versions of grep with -q (quiet) option