Added shorter timeout for disconnected device and updated example code