use temporary file when storage backend is s3