Fix bugs, add netrc gem dependency