Changed function to file loading.