Add another error catcher
fix addNode to detect if parent is null or undefined
move DS error logger