Improved wrapper, using `with` statement for modifying output transparently.