right before pushing to S3