Changed calls of the logger to be more effective