moved stdout handler