fixed duplicate variable
Add to_i method helper because nil.to_i eq 0
Add thrift_client_options