read file one at a time