Added config parameter for timeout duration