close the batch scanner