Added option to change S3 endpoint/region