Make output a WriteCloser and close it
Add s3 output