modified to read from archive and write to DATA_DIR