redirecting std out and log