improved adaptive read size algorithm
avoid sapply for data frames and matrices
debugging leftovers