modified load file from lib