added function NameExist for add and update a queue