fixing file loading for sampler object