Change stdout to be from self instead of generic sys.