added NSError returning to callbacks of command/variable APIs