Added node enablement check (issue #13) and added exit code at the end