Gamma-ray bursts (GRBs) are the most powerful explosive events in the Universe. The prompt gamma emission is followed by an X-ray afterglow that is also detected for over nine hundred GRBs by the Swift BAT and XRT detectors. The X-ray afterglow spectrum bears essential information about the burst, and the surrounding interstellar medium (ISM). Since the radiation travels through the line of sight intergalactic medium and the ISM in the Milky Way, the observed emission is influenced by extragalactic and galactic components. The column density of the Galactic foreground ranges several orders of magnitudes, due to both the large scale distribution of ISM and its small scale structures. We examined the effect of local HI column density on the penetrating X-ray emission, as the first step towards a precise modeling of the measured X-ray spectra. We fitted the X-ray spectra using the Xspec software, and checked how the shape of the initially power low spectrum changes with varying input Galactic HI column density. The total absorbing HI column is a sum of the intrinsic and Galactic component. We also investigated the model results for the intrinsic component varying the Galactic foreground. We found that such variations may alter the intrinsic hydrogen column density up to twenty-five percent. We will briefly discuss its consequences.