Made timeout configurable