Fix check of dependencies versions

Change-Id: I2725e805f93965b916d54d37ef11c4953e167790
Return error correctly while reading kmd.json values

Change-Id: Ia3953781b89358d494c8979fc9700d3ff93b8d17