fixed bug: logger should be initialized only once.