Fixed logging to use new style logging