added better error msg