made error message more useful