adds constructor to allow passing file instance