Connection test logic

Added safeguard to protect production servers from being deleted.