If err == nil && timeoutNum < 0
nil will be returned. I think that is not what you want.