Oh I just realized this does a no-no in Ruby which I always miss myself.  File.open, when a block is not passed, will create a file handle, which you have to close yourself.  Since you added the .each, the block is going to .each, not .open, and thus this file is not being closed properly.

Also, "r" is the default mode so that's not needed.  Alternatively you can do File.read, which might be cleaner.

```ruby
File.open(COOKIES_FILE) do |fh|
  fh.each_line do |line|
    # stuff
  end
end
```

or, cleaner:

```ruby
File.read(COOKIES_FILE).each_line do |line|
  # stuff
end
```