Use futures for 'with_statement'