adding archiving, fixed racecondition on download from s3