update a file