 		{
 			// error writing to EEPROM
 #if SERIAL && DEBUG
-			Serial.println("Error writing "+ String(t)+" to EEPROM");
+			cmdIo.println("Error writing "+ String(t)+" to EEPROM");
 #endif
 		}
 	}

/* InputParser handlers */

static void helpCmd() {
	Serial.println("c: print config");
	Serial.println("C: set Node (2 byte char)");
	Serial.println("N: set Node ID (2 byte int)");
	Serial.println("?/h: this help");
}

static void configCmd() {
	Serial.print("c ");
	Serial.print(static_config.node);
	Serial.print(" ");
	Serial.print(static_config.node_id);
	Serial.print(" ");
	Serial.print(static_config.version);
	Serial.print(" ");
	Serial.print(static_config.config_id);
	Serial.println();
}

static void configNodeCmd() {
	const char *node;
	parser >> node;
	static_config.node[0] = node[0];
	static_config.node[1] = node[1];
	static_config.node[2] = node[2];
	Serial.print("N ");
	Serial.println(static_config.node);
}

static void configNodeIDCmd() {
	parser >> static_config.node_id;
	sprintf(node_id, "%s%i", node, static_config.node_id);
	Serial.print("C ");
	Serial.println(node_id);
	serialFlush();
}

static void configEEPROM() {

		writeConfig(static_config);
	} else {
		loadConfig(static_config);
		initConfig();
	}
	cmdIo.print("W ");
	cmdIo.println(write);
}

InputParser::Commands cmdTab[] = {
	{ '?', 0, helpCmd },
	{ 'h', 0, helpCmd },
	{ 'c', 0, configCmd},
	{ 'n', 0, configNodeCmd },
	{ 'N', 3, configSetNodeCmd },
	{ 'C', 1, configNodeIDCmd },
	{ 'W', 1, configEEPROM },
	{ 0 }
};
