public static boolean overwriteFile(){
		if (f != null){
			try {
				f.createNewFile();
				FileWriter fw = new FileWriter(f.getAbsoluteFile());
				StringBuilder content = new StringBuilder();
				BufferedWriter bw = new BufferedWriter(fw);

				content.append("p " + character.x + " " + character.y + "\n");

				for (Rectangle r : platforms)
					content.append("f " + r.x + " " + r.y + " " + r.width + " " + r.height + "\n");

				for (Entity e : entities)
					content.append("e " + e.getType() + " " + e.getX() + " " + e.getY() + "\n");

				bw.write(content.toString());
				bw.close();
				return true;
			}
			catch (Exception ex){
				ex.printStackTrace();
			}
		}
		f = null;
		return false;
	}