solve Scanner not close issue