fixing log emitting and Node api