Added setup of logger and changed print statments to log statements