Use class method for constructing from file