fixing linereader for empty files