Remove file open in File.iterator and File.biniterator
Clean up and fixes in reducer code