function [output,errors] = ProcessPaths(paths, exts, callback)
    [paths,errors]=SanitizePaths(paths,exts);
    
    fprintf('Processing %d file(s)\n',sum(~errors));
    output=[];
    for i=1:numel(paths);
        try
            if ~errors(i)
                fprintf('Processing %s\n',paths{i});
                [out,abort]=callback(paths{i});
                output=[output,out]; %#ok<AGROW>
                if abort
                    errors(i)=true;
                    fprintf('\tAborted while processing %s\n',paths{i});
                end
            end
        catch c %#ok<NASGU>
           errors(i)=true;           
           fprintf('\tError occured while processing %s\n',paths{i});
        end
    end
   
    fprintf('Processing Complete\n');
    if sum(errors)>0
        fprintf('Errors occured and the following %d file(s) were not processed\n',sum(errors));
        fprintf('\t%s\n',paths{errors})
    end
end