more changes to file reader