Add the switch functionality and ensure exceptions thrown when errors in setup