Changed Node to only record its stacktrace if debug is on, for memory reasons.