Added more useful error messages