Updated error message to be more helpful

Also, added misssing test