adding somewhat more useful error feedback