add openFromFile method for Datafile class