public void close() throws Exception
	{
		synchronized(shows)
		{
			if(shows.isDirty())
			{
				//read in the old file data
				ShowArrayList temp = readShowsFromFile();
				ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("show_data", false));
				try {
					oos.writeObject(shows);
					//revert the change if it would corrupt the file
					if(new ObjectInputStream(new FileInputStream(new File("show_data"))).readObject() != null)
						throw new Exception();
				} catch(Exception e) {
					oos.writeObject(temp);
				} finally {
					oos.close();
				}
			}
		}
	}