made slightly better error msgs