added mode debug output