function [ metrics, nanValues ] = readValuesFromFile( statsFileID, metricFileName, metricName )

FileID = fopen( metricFileName );

if( FileID <= 0 ) %does the file exist?
    % if not
   message = ['WARNING: MISSING ' metricName ' FILE'];
   disp( message );
   fprintf( statsFileID, '\t \s missing', metricName );
   metrics=0;
   nanValues=0;
else
    metrics = fscanf( FileID, '%f', inf );  
    % remove the frame numbers
    metrics = metrics(2:2:end);
    % remove all 'NaN' values
    nanValues = isnan(metrics);
    metrics = metrics(~(nanValues));
%     fprintf( statsFileID, '\t %f ', value );
    fclose( FileID );
end