file handler leak fix.