fix file handler