Change logger dependency and fix bug