moved file loading to load() procedure