Added configurable timeout.