added support for s3 in production mode