public String generate() {
		String error = "No errors.";
		
		if (details)
			System.out.println("Heightmap flags: PRODUCE="+ioflags.PRODUCE+", SAVE="+ioflags.SAVE+", LOAD="+ioflags.LOAD);
		
		if (Utils.flagsCheck(ioflags) != 0) {
			System.out.println("ERROR: IOFlags object is corrupted, error: "+Utils.flagsCheck(ioflags));
			return "BaseTerrainGenerator critical error - read above.";
		}
		
		if (ioflags.PRODUCE)
			produceHeightmap();
		
		if (ioflags.LOAD) {
			error = loadHeightmap();
		}
		
		return error;
	}