Allow the archive option to be a function.
Added example of an archive function returning a string