Added timeout config option (default 0, which means no timeout)