fixed problem of sys.out close