file_put_contents($csv_file, preg_replace('/[\\r\\n]+/', "\n", file_get_contents($csv_file)));
    //    file_put_contents($resultsDir . '/' . $basename . '_tags.log', $status, FILE_APPEND | LOCK_EX);
    $csv = new EasyCSV\Reader($csv_file, 'r+', false);
    while (true) {
        $row = $csv->getRow();
        if (!$row) {
            break;
        }
        //        skip headers
        if (in_array(trim(strtolower($row['0'])), ['title', 'name', 'url', 'identifier', 'topics', 'categories'])) {
            continue;
        }
        //        no anchors please
        list($dataset, ) = explode('#', basename(trim($row['0'])));
        if (!$dataset) {
            continue;
        }
        //        double trouble check
        if (strpos($row['0'], '://')) {
            if (!strpos($row['0'], '/dataset/')) {
                file_put_contents($results_dir . '/' . $basename . '_tags.log.csv', $row['0'] . ',WRONG URL' . PHP_EOL, FILE_APPEND | LOCK_EX);
                continue;
            }
        }
        $package_id = $row['1'];
        $license_id = "cc-zero";
        $CkanManager->updateLicenseId($package_id, $license_id);
    }
}
// show running time on finish
timer();