contract Escapable is Ownable, ReentrancyGuard {
  using SafeERC20 for IERC20;

  /// @notice The `escapeHatch()` should only be called as a last resort if a
  /// security issue is uncovered or something unexpected happened
  /// @param _token to transfer, use 0x0 for ether
  function escapeHatch(address _token, address payable _escapeHatchDestination) external onlyOwner nonReentrant {
    require(_escapeHatchDestination != address(0x0));

    uint256 balance;

    /// @dev Logic for ether
    if (_token == address(0x0)) {
      balance = address(this).balance;
      _escapeHatchDestination.transfer(balance);
      emit EscapeHatchCalled(_token, balance);
      return;
    }
    // Logic for tokens
    IERC20 token = IERC20(_token);
    balance = token.balanceOf(address(this));
    token.safeTransfer(_escapeHatchDestination, balance);
    emit EscapeHatchCalled(_token, balance);
  }

  event EscapeHatchCalled(address token, uint256 amount);
}
/// @dev Creates an escape hatch function that can be called in an
///  emergency that will allow designated addresses to send any ether or tokens
///  held in the contract to an `escapeHatchDestination`
function escapeHatch(address _token, address payable _escapeHatchDestination) external onlyOwner nonReentrant {
  require(_escapeHatchDestination != address(0x0));

  uint256 balance;

  /// @dev Logic for ether
  if (_token == address(0x0)) {
    balance = address(this).balance;
    _escapeHatchDestination.transfer(balance);
    emit EscapeHatchCalled(_token, balance);
    return;
  }
  // Logic for tokens
  IERC20 token = IERC20(_token);
  balance = token.balanceOf(address(this));
  token.safeTransfer(_escapeHatchDestination, balance);
  emit EscapeHatchCalled(_token, balance);
}

/// @notice The `escapeHatch()` should only be called as a last resort if a
/// security issue is uncovered or something unexpected happened
/// @param _token to transfer, use 0x0 for ether