Logging system

And last two lines remove