Same technique needs to be applied to canDelete method, or else files won’t get deleted that should.