check files exsits before delete