bug#fix local variable undefined when logger failure