function rescue(address token, address to, uint256 amount) external onlyOwner {
    if (supportedTokens[token]) {
        revert ErrNotAllowed();
    }
    token.safeTransfer(to, amount);
    emit LogTokenRescue(token, to, amount);
}
function rescue(address token, address to, uint256 amount) external onlyOwner {
+    if (amount > IERC20(token).balanceOf(address(this)) - totals[token].total) revert();
-     if (supportedTokens[token]) {
-         revert ErrNotAllowed();
-     }
    token.safeTransfer(to, amount);
    emit LogTokenRescue(token, to, amount);
}
