logging functionality now working