Selectively use print statements instead of return