Fix median calculation for an emplty filelist