please, consider to support `with` by implementing `__enter__` and ` __exit__` method. it'll make this lib easier to use.