grep omit filename except during invalid file name