Handle pattern matching errors that mention file name