DDF-242 fixed logging and added unit test