Made it optional to supply a writer, created a 'traverse-file' fn.