Add support for timeout