set COOKIE_FILE as local variable in main()