Add check for empty String for the local directory in addition to null and add logging.

This PR contains:
Add check for empty String for the local directory in addition to null.
Add logging to detect why return null.
The StringUtils.isBlank() method is used to check cases where it is empty string or null due to misconfiguration.