using logger instead of e.printstacktrace() method in some catch blocks