added error function for update category for debuggin