Fixed error reporting
Added support for addBeforeCode and addAfterCode to all nodes