Implements run_{get,set}_cmd functions