Fix exception handling and remove debug output
Write new file to a temporary and move it afterwards.
Merge pull request #11 from toppoint/obscure-clients

Fixes and nodes.json consistency