Given how the Agent shuts down, doing any major cleanup in this case statement is not actually guaranteed to execute before the process exits. We can do it in the bottom half of the Run method, though.