split assertDevice from runCommand