Add base class, child class for textfile