general update, errmsg added