before delete from local