improve update_files