Configured logger and added check for existing IndexDirectory