Changed executeCommand to checkCommand, and made the end of command NAK send properly