Fixing inherited value-by-reference problem

When using configuration objects, giving a configuration path in the function leads to overruling the configuration value, leading to errors for the subsequent calls.
Placed variable initiation in wrong section
Adding error handler
Changed call order, replaced "on()" with "once()"
Merge pull request #2 from WickedSik/master

Fixing inherited value-by-reference problem