Fixed the wrppaing bug in bufread(). Now all my 4 test files come out right :)