Fix logger performance