added logic for web/file-based logs