Added configurable timeout