make timeout handler user-configurable