added header bucket option for s3 upload, added base64 decode/encode