Fix constructors to take file object instead of filename, to avoid opening too many instances of same file at once when timing constructors with %%timeit.