getOutput() now rebuilds the XML file each time, added keypress for sendToServer