Ошибка

Исключение - Call to a member function remove() on bool