Fixed issues with --retry-attempts when download fails (#81)