cutOffByFlag = (stack, flag) => {
	const errorStack = stack.split("\n");
	for (let i = 0; i < errorStack.length; i++) {
		if (errorStack[i].includes(flag)) {
			errorStack.length = i;
		}
	}
	return errorStack.join("\n");
}
@param {string} stack stack trace
@param {string} flag flag to cut off
@returns {string} stack trace without the specified flag included