Previous studies of critical behavior at the nematic to smectic-A transition by high-resolution x-ray scattering were performed using low magnetic fields of 0.1-0.8 T. In those studies, the transverse resolution was limited by the sample mosaicity which complicated data analysis. In order to understand the effect of sample mosaicity on the measured values of critical exponents, the divergence of the smectic order correlation lengths xi(parallel to,perpendicular to) and susceptibility sigma(o) was studied in a magnetic field ranging from 0.25 to 5 T. The use of high (5 T) field reduced the sample mosaicity and improved the effective transverse resolution by almost two orders of magnitude. Three liquid crystals, two mixtures of 6th and 7th homologs of 4,4(')-dialkylazoxybenzene (DnAOB) and 4-n-octylcyanobiphenyl (8CB) were studied. 15 wt% (D6.15AOB) and 40 wt% (D6.4AOB) mixtures of D7AOB in D6AOB have a wide nematic range, while 8CB has a narrow nematic range. Analysis of the data at different fields revealed a different and proper way to apply the mosaicity correction. The Gaussian mosaicity correction was found to be temperature independent but significantly (similar to3.5 times) smaller than the width of the sharpest q(perpendicular to)-scan, which has traditionally been used for mosaicity correction in all previous studies. The values of the critical exponents measured over almost four decades of reduced temperature were: nu(parallel to)=0.79+/-0.02, nu(perpendicular to)=0.69+/-0.02, gamma=1.46+/-0.04 for D6.15AOB; nu(parallel to)=0.79+/-0.02, nu(perpendicular to)=0.67+/-0.02, gamma=1.44+/-0.04 for D6.4AOB; and nu(parallel to)=0.70+/-0.02, nu(perpendicular to)=0.52+/-0.02, gamma=1.24+/-0.04 for 8CB. The results for the two mixtures suggest that in wide temperature range nematics, far from the tricritical point, the exponents may be material independent. No significant effects of mosaicity on the values of the coefficient c of the fourth-order term in the structure factor were observed.