added thread which send only if write Data is finised