[+TASK] Added a security check for categories with invalid paths