Updating script to v12.2

- inconsistency in argument -a fixed
- mixup of $data / $matchingData fixed
- better deviceName check/stop warning with wrong values
- improved some debug output (formatting changed)