Add system state tracking

This prevents you from possibly ruining the system (to the point where a JVM restart is required) by accidentally running the same action twice.