Add timeout support for client mode