public void closeImmediately() {
		/* write the window size */
		this.store.setVariable(CONFIG_WINDOW_SIZE, Util.dimensionString(this.getWidth(), this.getHeight()));
		
		/* close the task store: this is done in a loop to handle errors */
		boolean promptDirectory = false;
		while (true) {
			try {
				/* if the saving failed before and user chose to try another directory, prompt for it */
				if (promptDirectory) {
					File path = TaskMistress.showPathDialog();
					if (path != null) this.store.setPath(path);
				}
				
				/* close the task store, saving all dirty tasks */
				this.store.close();
				
				/* if no errors, break the loop */
				break;
			} catch (Exception e) {
				/* error: prompt the user whether to try again */
				int choice = JOptionPane.showConfirmDialog(this,
				                                           "Saving the task tree failed. Try again?",
				                                           "Error!",
				                                           JOptionPane.YES_NO_CANCEL_OPTION);
				if (choice == JOptionPane.YES_OPTION) continue;
				if (choice == JOptionPane.CANCEL_OPTION) return;
				
				/* prompt the user whether to save the task tree in another place */
				choice = JOptionPane.showConfirmDialog(this,
				                              "Do you want to save the task tree to another directory?",
				                              "Error!",
				                              JOptionPane.YES_NO_OPTION);
				
				/* if "no" is selected, just exit without trying to save again */ 
				if (choice != JOptionPane.YES_OPTION) break;
				/* "yes" selected: set the directory to be prompted */
				promptDirectory = true;
			}
		}
		
		/* make sure the task store is collected */
		this.store = null;

		/* dispose of the window */
		this.setVisible(false);
		this.dispose();
	}