fix bug in previous commit

that code would just omit
writing files altogether