added function to load file