fix(file): destroy output buffer before sending file