Fix netrc code to work and bugs