Two-dimensional (2D) compounds provide unique building blocks for novel layered devices and hybrid photonic structures. However, large surface-to-volume ratio in thin films enhances the significance of surface interactions and charging effects requiring new understanding. Here we use micro-photoluminescence (PL) and ultrasonic force microscopy to explore the influence of the dielectric environment on optical properties of a few monolayer MoS2 films. PL spectra for MoS2 films deposited on SiO2 substrates are found to vary widely. This film-to-film variation is suppressed by additional capping of MoS2 with SiO2 and SixNy, improving mechanical coupling of MoS2 with surrounding dielectrics. We show that the observed PL non-uniformities are related to strong variation in the local electron charging of MoS2 films. In completely encapsulated films, negative charging is enhanced leading to uniform optical properties. Observed great sensitivity of optical characteristics of 2D films to surface interactions has important implications for optoelectronics applications of layered materials.