File write and read update