Added a condition to precent NPE exception in case the default cpd file directory is empty.