The Goatherd scolded them for their ingratitude in leaving him , when during the storm he had taken more care of them than of his own herd .