main category checking before adding and corresponding error message
added error when new main category exists and bug fix when not exists