changed `load_file` to a class method