Adding logging library and converted prints to logs.