Decorator wraps context manager around func