add funs to mutate reg.files and dirs