Adding a configurable timeout