finish file input and basic methods