use Buffer throughough write flow
tshooting file mangling issue
fixed file mangling, mostly needed --data-binary flag on curl command