#491:  add device check, add tests