[medium] fix and improve pattern matching in filechecker