Make download script work with new configuration.
Fix stats for files.