Fxing Stdout and priting problems