Fix function to recongize file entries