added a sample file and dealt with the case where ' delimiter was last char in read buffer