checking switch status, fixing spring double context initialization, logging