check_archive function now allows directory specification and reprocessing