Add S3 downloading
the fold errors for different functions have been moved to common.package