public void deleteFile() {
		String dirPath = "resources/files/RecipeData/" + recipeID + ".json";
		File currFile = new File(dirPath + recipeID + ".json");
		if (!currFile.exists()) {
			return; //there is nothing to delete
		}
		
		String jsonString = ""; //the json String representation of the last File
		RecipeData lastRecipeData;
		File f = new File(dirPath);
		int lastID = f.listFiles().length - 1; //with 2 files, last ID 1 -> -1
		File lastFile = new File("resources/files/RecipeData/" + lastID + ".json");
		BufferedReader reader = null;
		try {
			reader = new BufferedReader(new FileReader(lastFile));
			
			String lastReadLine = reader.readLine();
			while (lastReadLine != null) {
				jsonString += lastReadLine;
				lastReadLine = reader.readLine();
			} //Get the json String representation of the last File
			lastRecipeData = new RecipeData(jsonString); //load the last recipe
			lastRecipeData.setRecipeID(recipeID); //set the last recipe's ID to the curr one
			lastRecipeData.writeFile(); //overwrite the file to be deleted with the last one
			reader.close(); //close reader in order to delete the last file
			lastFile.delete(); //deletes the last file as it is already written at the currFile's id
		}
		catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		catch (IOException e){
			e.printStackTrace();
		}
		finally {
			if(reader != null) {
				try {
					reader.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
	}