Updated logging message and changed throw exception for a null path and
as suggested.