@ Override
	public boolean writeToFile(final File file, T object, boolean replaceIfExists)
	{
		// Delete file if it exists
		if (file.exists () && replaceIfExists) {
			file.delete ();
		} else
			return false;
		
		FileOutputStream fOS = null;
		ObjectOutputStream oOS = null;
		
		try { // Write object to file using FileOutputStream and ObjectOutputStream
			fOS = new FileOutputStream (file);
			oOS = new ObjectOutputStream (fOS);
			
			oOS.writeObject (object);
			oOS.close ();
		} catch (IOException e) {
			e.printStackTrace ();
			return false;
		} finally { // Close FileOutputStream and ObjectOutputStream
			if (fOS != null) {
				try {
					fOS.close ();
				} catch (IOException e) {}
			}
			
			if (oOS != null) {
				try {
					oOS.close ();
				} catch (IOException e) {}
			}
		}
		
		return true;
	}