Fixed bug with Command. waitfor should expect --END COMMAND--\n\n string