Bedsores that go untreated; residents being denied medication when in pain; and staff lacking knowledge in the very basics of caring for the elderly.

How depressingly familiar this litany of failure in the care sector has become.

Care homes for the elderly should be havens, places of safety and comfort where those who are ill or frail are looked after with kindness and expertise. Most care facilities are exactly that. Yet, in recent months, home after home has been revealed as failing its residents, and not just in small ways. Last year, inspectors found that staff at Ainslie Manor in Girvan, South Ayrshire, failed to intervene in cases of people suffering bedsores. At Torbrae House, Castlemilk, staff had to be taught how to notice if a resident was dehydrated; Knowesouth near Jedburgh was so short-staffed an enforcement order against the owner required an immediate increase in the number of workers.

Last month, it emerged that several homes in Edinburgh had been closed to new referrals because of concerns about quality of care. Police have investigated the deaths of four people at Pentland Hill home and the findings of the inquiry have been passed to the Crown Office. The details of the three worst performing homes in Scotland have been revealed by The Herald.

Each received the lowest possible grading in every category of care. The Livingston Nursing Home in West Lothian, Highview Care Home in Inverness and Avondale Nursing Home in Motherwell received a grading of one on a scale of one to six. There are signs of improvements being made but they could close if they fail to improve. In those circumstances, so they should.

It must be said that these failures are not representative of the average Scottish care home. Many are consistently excellent and take enormous pride in creating a welcoming, secure and stimulating environment for residents. How infuriating it must be for them that the failures of the few reflect so badly on the sector as a whole.

The few that are substandard are still too many. Public funding constraints are no excuse for fundamental failures. The Care Inspectorate, with its regime of unannounced visits, combined with a robust external complaints system, is clearly succeeding in identifying problems. This is greatly to its credit yet, so far, the threat of exposure and criticism by the inspectorate has not been enough to jolt all care home managers into bringing their establishments up to scratch off their own bat.

The aim must surely be for the inspection regime to act, not only as an early warning system to identify failures, but also as a deterrent. The fear that the next car to pull up outside could be an inspector should have the effect of keeping managers and staff on their toes.

The inspectorate must be prepared to bare its teeth. Commendably, it appears ever more willing to do so but it might take the closure of more homes before the managers of poorly performing ones finally get the message that poor standards simply will not be tolerated.