DDF-337  added null checks for filePath per code review comments
DDF-337  reformatted per checkstyle
DDF-337  added unit tests for null filePaths