DDF-399 added extra logging statement and removed unused variable