fix file reader