Changed getTraceStack to static function