patch grep to return match, add trailing text to record actual messages