infile: new deferredClose func instead of lambda funcs