file reader code review