Added some error verification
Check keys for nodes