Implemented some logging