add device logging and qrkey fix