Closes the dialog box and aborts reading.