Scottish judge criticises medical care of murdered baby