Added simple output redirecting.