improve pac file handler