Update writefiles