add validation of running mode