corrected incorrect file reading