end output buffer before sending file