I don't think this can work. If you redirect all output (stdout and stderr), you won't have anything left to grep on.