Added logs and type fixes.