it works fine for select but when i try to update it erases my XMl file.