static void sourceCode (SourceCode toSave, String destination, String extension)  //All-purpose file to output file input back to a file.
	{
		int size = toSave.line.length;
		int i = 0;
		String newLine = Settings.newLine;
		
		ErrorLog.debug ("Saving source code. Size =" + size + ". Last element is: " + toSave.line[size - 1]);
		
		while (new File (destination + i + extension).exists())
		{
			i++;
		}
		
		ErrorLog.debug("Saving as " + destination + i + extension);
		
		try
		{
			FileWriter fw = new FileWriter (destination + i + extension);
			
			ErrorLog.debug("Fw object created.");
			
			try {
				for (int j = 0; j < size && toSave.line[j] != null; j++)
				{
					ErrorLog.debug("In loop" + j);
					fw.write(toSave.line[j] + newLine);
				}
				
				fw.flush();
				fw.close();
				
				ErrorLog.debug("File saved.");
			} catch (IOException e) {
				fw.close();
				ErrorLog.addError(e.getMessage());
				e.printStackTrace();
			}
		}
		catch (IOException e)
		{
			ErrorLog.addError(e.getMessage());
			e.printStackTrace();
			
			ErrorLog.debug("File not saved.");
		}
		catch (NullPointerException f)
		{
			ErrorLog.addError(f.getMessage());
			ErrorLog.debug("Internal data alignment error.");
		}
	}