Use flag instead of env check