implement log buy threading

2 threadings,
one is for receiving data from Q_err,
one is for proceccing data