if (dataDirectory.exists() && dataDirectory.isDirectory() == false)
{
dataDirectory = dataDirectory.getParentFile();
if (dataDirectory.isDirectory() == false)
{
throw new ReportProcessingException("DataDirectory is invalid: " + dataDirectory);
}
}
else if (dataDirectory.exists() == false)
{
if (dataDirectory.mkdirs() == false)