handle file updating