redirect stdout in log