move loging into Node class