Slightly better debugging in device handling