$debug->add("oDbc: " . var_export($oDbc, TRUE));
$DEBUG_LVL = 2;
$todo = count($ids);
$USE_LOCAL_FTP === TRUE ? $debug->add("Using Local FTP - 241") : $debug->add("Using Remote FTP - USA");
$debug->add("Preparing to process {$todo} contents...");
// borro work_dir
$debug->add("Cleaning working dir {$work_dir}...");
exec("rm -rf {$work_dir}/*");
$i = 0;
$j = 0;
foreach ($ids as $id) {
    $i++;
    $debug->add("******* Processing content #{$id}, {$i} of {$todo}...");
    $map = $xml_map["mp3_tpl"];
    $wp = new mp3($oDbc, $id);
    $wp->load($workingCat, $workingSubCat);
    // copio archivos
    $debug->add("## Copying mp3 sources...");
    $download_ok = FALSE;
    $file = $wp->icons;
    $debug->add("Downloading {$file}...to " . "{$work_dir}/" . $wp->filename . ".mp3");
    if (get_preview($file, "{$work_dir}/" . $wp->filename . ".mp3") === TRUE) {
        $debug->add("Download OK!");
        $download_ok = TRUE;
    } else {
        $debug->add("Download ERROR!!!");
    }
    if ($download_ok === TRUE) {
        $debug->add("Success!!! " . $wp->filename . ".mp3");
        $wp->add("objects", "<file>" . $wp->filename . ".mp3</file>\n");
    } else {