Logging module is almost refactored .... everything is working now.
It is missing a write_t function and the differentiation among LogData for head and tail.