Error handling for Node Domain code.

I've managed to get this extension running (**great work btw!**), but before I managed that, it actually crashed my Brackets for a few times. I've put some proper checking in place so that doesn't happen to other users when they install your extension. Check comments in code for details.

Also commented out some console.logs.